Martin I. Levi wrote:
Could you provide the classes, and repository_user.xml for a sample that shows your problem (e.g. A, B, C, D, Main) ? I'll then check whether it's a bug in OJB.Well I think this is what you are talking about:
#---------------------------------------------------------------------------------------- # OQL / SQL settings #---------------------------------------------------------------------------------------- # The OqlCollectionClass entry defines the collection type returned # from OQL queries. By default this value is set to DListImpl. # This will be good for most situations as DList allows maximum flexibility # in a ODMG environment. See also section 'ODMG settings'. # Using DLists for large resultsets may be bad for application performance. # For these scenarios you can use ArrayLists or Vectors. # Important note: the collections class to be used MUST implement the # interface org.apache.ojb.broker.ManageableCollection. # OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl_2 # OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableArrayList # OqlCollectionClass=org.apache.ojb.broker.util.ManageableVector #
What happens here is that I get DListImpl_2 when I execute the typical
OQL query: select myniceObjects from A.getClass().getName();
but when I ask for an embedded property, I mean something like:
select x.B.c from A.getClass().getName();
I get a org.apache.ojb.broker.util.collections.ManageableArrayList.
The main problem I have is that there's not a lot of documentation aboutAFAIK the Manageable family are the default collections used by the OJB PB Api. They provide hooks for the persistence management of OJB. Normally they are used transparently, e.g. in the Java class you define the type java.util.Collection and OJB will use an ManageableArrayList when loading the object from the database.
DCollections or ManageableCollections, so i was trying to guess which
uses could be given to such classes (not just DList but the complete
DCollection family and the ManageableCollection family also). Any ideas
about that would be very interesting to me.
An extension is provided by the RemovalAwareList which also keeps track of removals and additions to the list which speeds up the operation because only the changes have to be made persistent. In this regard, this class is similar to the D family of the ODMG impl.
Since you're using ODMG, you should be fine with DListImpl_2 for the OqlCollectionClass. If not then it might be a bug in OJB.
Tom
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
