validation error [message #729089] |
Sat, 24 September 2011 22:34  |
Eclipse User |
|
|
|
Hi,
I just upgraded from Eclipse w/ WTP 3.6.2 to 3.7.1 (Dali 3.0.1), and it
appears Dali's validation is stricter or perhaps has a bug. I got no
errors with 3.6.2, but now I'm getting:
The identification variable 'mil' is not defined in the FROM clause. orm.xml
and this is:
w.approvalStatus = mil.army.usace.p2.constants.ApprovalStatus.PENDING
in the context of:
<named-query name="workflowProcess">
<query>
SELECT w
FROM WorkflowProcess w
WHERE w.projectId = :projId
AND w.processTypeWorkflowStatusId = :statusId
AND w.approvalStatus =
mil.army.usace.p2.constants.ApprovalStatus.PENDING
AND w.workflowCycleCount = :count
</query>
</named-query>
Can anyone tell me why it's mistaking that package name for an
identification variable? Do I need to make some change now?
Thanks,
Ari
|
|
|
|
|
|
Re: validation error [message #731398 is a reply to message #729720] |
Fri, 30 September 2011 16:29   |
Eclipse User |
|
|
|
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.
Neil
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.13905 seconds