-
1. Re: ejbql finder bug?
mikea-xoba Feb 29, 2004 11:51 AM (in response to mikea-xoba)sorry, i described it slightly incorrectly:
although this entity bean has a CMP primary-key field and CMR field that share a database column, the CMR that the finder method is navigating is *another* CMR field, which has its own database column on the 'other' side of the relationship. thus, it seems less relevant to the bug i described than i initially thought.
but i'm still stumped at this behaviour and think its incorrect (i.e., may be a bug)
mike -
2. Re: ejbql finder bug?
aloubyansky Feb 29, 2004 9:05 PM (in response to mikea-xoba)Please, post DDs and relevant code snippets. Thanks.
-
3. Re: ejbql finder bug?
mandrews-flarion Mar 2, 2004 1:39 PM (in response to mikea-xoba)thanks so much --- will plan to abstract out a super-simple application with 2 or 3 entity beans that demonstrates the effect (if i can reproduce it!), with a client. mike
-
4. Re: ejbql finder bug?
mikea-xoba Mar 3, 2004 8:36 AM (in response to mikea-xoba)hi there,
i prepared a zip file which is a complete jboss ejb project with a client, intended to [eventually] exhibit the bug i described in previous posts. the zip file is available at http://xoba.com/debug-2.zip and basically just contains three entity beans and a single client class. a 'properties.txt' file contains pointers to needed resources, like xdoclet, the jboss-server, etc, and needs to be customized before building. the 'deploy' ant target builds and deploys the ejbs to the jboss server. the 'client' ant target builds and runs a client that exhibits a [jboss] CMP/CMR bug; i see the bug in a standard jboss-3.2.3/all server and the project as configured uses mySQL in a database named 'debug' (see properties.txt for that).
the bug which is exhibited by debug-2.zip is not precisely the bug i described in previous posts, having to do with the shared CMP/CMR field. indeed, changing a couple xdoclet tags in the bean named 'First' of debug-2.zip is all it takes to move onto that particular bug, which i think should be postponed until the present one (in debug-2.zip) is solved. perhaps even solving this bug will also solve the other one since they may be related.
specifically, this bug is: when executing a finder method to find all beans of 'First' type that are related to beans of 'Third' type (i.e., "SELECT OBJECT(c) FROM First AS c WHERE c.third is NOT NULL"), it seems jboss is not doing the necessary table join in SQL. and that's the bug you will see exibited when you execute the 'client' ant target in debug-2.zip, and the SQL error message is due to the fact that jboss is trying to access the table of the 'Third' bean without doing the necessary table join.
as a side note, in the bean named 'First', the primary key is logically the combination of a String and a CMR field. since there is no way of doing that directly in EJB (since the relationships must be set in ejbPostCreate, whereas the primary key is returned in ejbCreate), the idea is to have a CMP and CMR field share a database column. when implementing this, i ran into the bug i described in previous posts. on fiddling some more, i ran into the present bug, the one i exhibit in debug-2.zip. this present bug *does not* share the database column, and yet there still seems to be a bug. thus, i thought it better to solve this bug first, and then move onto the version where the database columns are shared, if indeed solving the present bug doesn't also fix the latter one.
thanks so much,
mike -
5. Re: ejbql finder bug?
mikea-xoba Mar 3, 2004 6:44 PM (in response to mikea-xoba)i updated http://xoba.com/debug-2.zip to reflect the state of that project after its built, so that deployment descriptors created by xdoclet etc etc are all present now. this may be more convenient than depending on folks to build it for themselves. thanks in advance --- mike
-
6. Re: ejbql finder bug?
aloubyansky Mar 6, 2004 10:30 PM (in response to mikea-xoba)Could you please submit a bug report on sf.net/projects/jboss? Thanks.
-
7. Re: ejbql finder bug?
mikea-xoba Mar 7, 2004 1:09 PM (in response to mikea-xoba)glad to do so --- i may delay a bit while i investigate some more, however --- hope that's alright. thanks - mike