Better error for bad EJB QL
---------------------------
Key: GERONIMO-1072
URL: http://issues.apache.org/jira/browse/GERONIMO-1072
Project: Geronimo
Type: Bug
Components: OpenEJB
Versions: 1.0-M5
Reporter: Aaron Mulder
Fix For: 1.0
I have 2 tables with CMR -- say Parent(ID) and Child(ID, PARENT_ID). In this
case, I set up the Child EJB so that it did not have a CMP field for PARENT_ID,
but it did have a CMR using that as the foreign key.
I wrote an EJB QL statement something like "SELECT Object(c) FROM Child c WHERE
c.parentId=?1" and got this error (and nothing on the console):
Error: Operation failed: Unable to initialize EJBContainer GBean:
ejbName [Test] caused by EJB [Entity logical name=[Test]; physical
name=[Test]]
This was not terribly helpful in diagnosing the problem, which was that my EJB
QL actually should have been "SELECT Object(c) FROM Child c WHERE
c.parent.id=?1". It did not even mention EJB QL. Ideally, it would say
something like "Invalid EJB QL for Query [findByParent] for EJB [Test]".
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira