grails-data-mapping icon indicating copy to clipboard operation
grails-data-mapping copied to clipboard

JPA Mapping Composite ID

Open felixscheinost opened this issue 5 years ago • 0 comments

Task List

  • [x] Steps to reproduce provided
  • [ ] Stacktrace (if present) provided
  • [ ] Example that reproduces the problem uploaded to Github
  • [ ] Full description of the issue provided (see below)

Steps to Reproduce

Add a domain like in this commented out test case:

https://github.com/grails/grails-data-mapping/blob/f1158a73b4127a7aab41608e4ae6e0804079e544/grails-datastore-core/src/test/groovy/org/grails/datastore/mapping/model/JpaMappingSyntaxTests.groovy#L386-L393

Expected Behaviour

The project should compile.

Actual Behaviour

The project fails to compile with the following error(s):

[...].groovy: -1: The method public java.lang.Long getId()  { ... } duplicates another method of the same signature
[...].groovy:: -1: Repetitive method name/signature for method 'java.lang.Long getId()' in class '[...]'
[...].groovy:: -1: Repetitive method name/signature for method 'java.lang.Long getId()' in class '[...]'

Environment Information

  • Operating System: macOS 10.15.7
  • GORM Version: 7.0.4
  • Grails Version (if using Grails): 4.0.3
  • JDK Version: 8

felixscheinost avatar Nov 09 '20 12:11 felixscheinost