Ok the following initial situation:
article has relations to the other tables. There are no other relations.
To improve performance i wan't get a amount of arbitrary articles over dynamicQL and load the relations at the same time with a "left-join cmr-field" declaration in the jbosscmp-jdbc.xml.
But I have the following behaviour:
The SQL-Statment would be sent correctly, and I become e.g. a recordset with 15000 rows back. The container creates now for every row an ejb(cmp). This is not correct, he should only create an ejb for an article (this are perhaps 30 rows).
So I thought, not so bad, after I executed the statment I have this rows in the cache and when I execute the Statment without the "left-join cmr-field" until after the first statment, I become the right amount of ejb's and the relation's wouldn't be load, because they are cached.
But Far from it, after I executed the Statment without the "left-join cmr-field" (until after the first statment where I loaded all relations, that means in the same transaction) and navigated to the related tables, all the relations have been loaded again.
What should this behaviour??? Is the behaviour of dynamicQL not the same like EJB-QL????