Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Re: @OneToMany on fields with em.persist() - Different behavior for EclipseLink 2.1

I just further investigated this problem. I think this is a bug caused by the following performance-patch:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=283335

I posted my thoughts over there, unfortunately I cannot reopen a bug :-(


Best regards,

Johannes Michler

2010/7/7 Johannes Michler <orgler@xxxxxxxxx>
Hi,

we're developping an eclipse-rcp-application using Eclipselink. We have an Entity Group and an Entity Person with a OneToMany Relationship from Group to Person:

@Entity
Group{
   @OneToMany(mappedBy="m_group")
public List<Person> m_persons;
}

Using this we're doing the following:
Group g = new Group();
em.persist(g);


On EclipseLink 1.1 (Galileo-Release) g.m_persons was set to an "Lazy-Instance" Set after this call to persist(). But with eclipse 2.1 (Helios) g.m_persons is null.

Why is there a change of semantic? Can I get the "old" behavior? When setting Cascade=Cascade.Persist it seems to work. But we have many Entities in a similar way in our application and this would need us to change big parts of our persistence-logic :-( Furthermore I don't know what other Problems this would cause. Are there more such semantic-changes with Eclipselink 2.1?



Best regards
Johannes


Back to the top