Hibernate version: 3.0
Name and version of the database you are using: MySQL 4.1.16-nt
I have a mapping question that should be easy to answer for the Hibernate cracks on this boards:
I want to map the following class:
Code:
public class Element
{
protected Integer elementId;
protected Element predecessorElement;
[...]
}
My question is: How do I map the predecessorElement property. This is a reference to another Element object that serves as the base of the current object. The object
may be null. Furthermore the predecessorElement may only have
one Element that it precedes.
Basically this seems to be a one-to-one association with the exception that both the actual Element and its predecessors are stored in the same table (element).
Thanks in advance for your advice.
EDIT: I just realized that I accenditally posted in the wrong forum, shame on me... Would be nice if the mods could move this thread to the Hibernate Users forum.