|Re: validation error [message #731398 is a reply to message #729720]
||Fri, 30 September 2011 20:29
| Neil Hauge
Registered: July 2009
Ari Meyer wrote on Mon, 26 September 2011 15:50|
I do have many such annotations across my entities with the same name
"booleanConverter". Is this considered invalid now? Obviously I could
make each name unique to get around this, but is there a way to define
the reference globally using an annotation, or do I need remove these
annotations and use eclipselink-orm.xml?
Sorry I missed your previous post.
The fact that we are using an Error for this condition is probably overkill, but the reason it is being flagged is that all converters are global, regardless of where they are defined. So, you can define it once in an entity and reference it in other entities. You could also define the converter in a mapping file as you mentioned, which is considered a better solution as it is awkward to have a global defined in a Java entity. At the end of the day though, it is up to you where you want to define it, as it will be a global definition regardless of where it is defined.
Powered by FUDForum
. Page generated in 0.02460 seconds