| Summary: | [Validation] Validation for duplicate entity names and mapping file mapped classes | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Nan Li <nan.n.li> | ||||||||||
| Component: | JPA | Assignee: | Nan Li <nan.n.li> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | neil.hauge | ||||||||||
| Version: | unspecified | Flags: | neil.hauge:
review+
|
||||||||||
| Target Milestone: | 3.1 M1 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows 7 | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Nan Li
Created attachment 197619 [details]
Proposed Patch
Created attachment 198051 [details]
Proposed Patch
Removed unnecessary duplicate validation when entity/class name is an empty string based on the previous proposed patch
Moving JPA specific bugs to new JPA component in bugzilla. This patch has a small merge conflict with the current code. Please submit an updated patch so I can complete this review. Thanks! Created attachment 199432 [details]
Proposed Patch
Removed conflict with current code
Some comments: AbstractPersistenceUnit - The methods buildEntities() and buildTypeMappings() need to be renamed. The "build" prefix should be reserved for methods that are going to be creating or are used in the creation of new objects. In this case, these methods are only retrieving existing objects, and are not being used to build up some other object. A prefix of "get" will probably be appropriate in this case. The names also need to be more descriptive. There are already methods for getEntities() and getTypeMappings(). The new methods you are creating do something different, so that needs to be expressed in the method name. Other than that, I think this patch is in pretty good shape. Created attachment 199502 [details]
Proposed Patch
Integrated the review comments
Patch has been committed to head. The only other potential issue with the code was not exclusive to the patch code, so I am just going to address this issue post patch. The methods in AbstractPersistenceUnit that begin with 'map' are a bit questionable. I think the 'get' prefix may be more appropriate in this case but we can discuss it further. |