FYI: To fix this issue, I had to add the <many-to-one property="partner" destination="Partner" />
association metadata into data-services-config.xml file. Zdenek M --- In [email protected], Zdenek Mikan <zde...@...> wrote: > > I am trying to make the database application in Air, which should work > also offline. But I have a problem with associations. > > I have two databases: Partner and Contact. In Contact there is a > ManyToOne association to Partner, based on the join table: > > @ManyToOne(targetEntity=Partner.class, cascade={CascadeType.ALL}) > @JoinTable(name="partner_contact", > joincolum...@joincolumn(name="fk_contact", > referencedColumnName="contact_id"), > inversejoincolum...@joincolumn(name="fk_partner", > referencedColumnName="partner_id")) > private Partner partner; > > The problem is that when I create a new partner offline, then add a new > contact referencing this new partner, everything is OK when I am > offline, but after getting online and commiting offline changes, the new > partner is created two times. > > Does anybody know the fix for this? > > Thanks in advance > > Zdenek M >

