Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Won't Fix
-
1.2.5.RELEASE
-
None
Description
Detailed test case:
Execute the following commands:
project --topLevelPackage finders --projectName finders
jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
entity jpa --class ~.SampleEntity
field string --fieldName fieldene
field string --fieldName fieldTwo
class --class ~.util.Constants --abstract
Add 'public static final String FIELD = "fieldOne"' to finders.util.Constants
Add 'import static finders.util.Constants.FIELD;' to finder.SampleEntity
Add 'import javax.persistence.*' to finders.SampleEntity
Annotate finder.SampleEntity with '@Table(name = FIELD, uniqueConstraints = @UniqueConstraint(columnNames =
))'
Execute the command: 'finder add --class ~.SampleEntity --finderName findSampleEntitysByFieldOne'
@Table annotation becomes '@Table(name = unknown.Object.FIELD, uniqueConstraints = @finders.UniqueConstraint(
))' (EXPECTED: no changes made)
The same happens when a field is added to the entity (I suspect any modification will produce the above issue, probably it is not limited to entities, either).
Note that the FIELD and UniqueConstraints do not become corrupted if they are already fully qualified prior to 'finder add ...'; however, 'columnNames = ... ' still disappears.