[hibernate-dev] [OGM] AssociationKey table property during the create tuple association

Guillaume SCHEIBEL guillaume.scheibel at gmail.com
Wed Mar 7 11:08:41 EST 2012


Hello,

I'm writting the OGM dialect for mongodb and I work on the @OneToOne
association.
When the createTupleAssociation method is called, there is an
AssociationKey parameter which should (I think) represents the object to
which we are associated.

Let's take a very short example:

class EntityA {

       @Id
       String id;

       @OneToOne
       EntityB entityb;

       //with getters, setters,  etc.
}

class EntityB {
       @Id
       String id;

       //with getters, setters,  etc.
}

Currently, the rowKey object refers to EntityA (with the table name and the
id) and AssociationKey refers to EntityB. But the table property of
AssociationKey is set to entityA and not entityB as it should be.

Did I miss something or is it a real "bug" ?

Thanks
Guillaume



More information about the hibernate-dev mailing list