You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Marko Lahma <ma...@sysforte.fi> on 2003/07/29 14:39:04 UTC

Objects wich refer to instances of same type

Hi all!

I've had quite a lot problems trying to have OJB objects include 
references to classes of same type. Like User having another User as 
creator. When trying to persist the class's field isn't filled with the 
creator's user name etc.

Mapping file snipped as follows:
  <reference-descriptor
  	name="createdBy"
   	class-ref="User"
 >
	<foreignkey field-ref="creator"/>
</reference-descriptor>

The class has field String creator (foreign key ref to user table's 
username column) and field User createdBy. All fields are introduced in 
the mapping file too.

Is this even possible and are there any examples of this?

Regards,
Marko



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org