Sorry, I had a field-conversion in place for the ojbConcreteClass-column and delivered 
the wrong value to the database.

- Martin

-----Original Message-----
From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 23, 2004 6:57 PM
To: OJB Users List
Subject: Re: Using OJB with generalization hierarchies


Marinschek Martin wrote:
> Hi there,
> 
> I have read through the tutorials and the mail-archive, but have not 
> found a solution to my problem:
> 
> 1) I am using the PersistenceBroker API
> 2) I have a generalization hierarchy: class B and C both extend A (an 
> abstract class)
> 3) I map this hierarchy to one table
> 4) I do a 
> 
>         QueryByCriteria q = QueryFactory.newQuery(A, crit);
> 
> And want to get all instances of B and C - but get nothing...

You need to tell OJB what class to instantiate. You do this by having a 
special field in all these classes (put it in A) called 'ojbConcreteClass'. For more 
info see here:

http://db.apache.org/ojb/docu/advanced-technique.html#Mapping+All+Classes+on+the+Same+Table

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to