JBoss 3.2.6, default setting in standardjbosscmp-jdbc.xml, commit option A used.
I observed strange selects for two applications. There is relation A -> many B
(unidirectional).
a.getBs() gives select:
SELECT LOID FROM B WHERE (A_FK=?)
and now every entity B is access by fields, it gives:
SELECT LOID, field1 FROM B WHERE (LOID=?) OR (LOID=?) OR (LOID=?) OR (LOID=?)
OR ...
SELECT LOID, field2 FROM B WHERE (LOID=?) OR (LOID=?) OR (LOID=?) OR (LOID=?)
OR ...
and so on for every field. So obviously read-ahead works and eager-load-group
doesn't (no overrried of eager group, using defaul * )
Even to be sure I tried to set read-ahead for relation:
<ejb-relation>
<ejb-relation-name>A2Bs</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>A2Bs:A</ejb-relationship-role-name>
<key-fields>
<key-field>
<field-name>loid</field-name>
<column-name>A_FK</column-name>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</key-field>
</key-fields>
<read-ahead>
on-load
<eager-load-group>*</eager-load-group>
</read-ahead>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>A2Bs:Bs</ejb-relationship-role-name>
<fk-constraint>true</fk-constraint>
<key-fields/>
</ejb-relationship-role>
</ejb-relation>
I didn't change the behaviour.
(by the way loading of main entity A is ok, eager load works properly in this
case)
So could someone explain me what is wrong, and how to make it right?
(no clues on wiki and jira)
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882259#3882259
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882259
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user