« Return to Thread: Static weaving issue? New object not persisted
Jan Vissers wrote:Hi,
Indeed - setting 'eclipselink.weaving.changetracking' to false seems to
resolve the issue. Can you explain how this setting influences
EclipseLink to make this case work?
Thanks,
-J.
On Mon, 2008-06-23 at 08:13 -0700, James Sutherland wrote:
> Very odd.
>
> When you don't use static weaving, are you using dynamic weaving or no
> weaving?
> Do any errors occur during weaving or anywhere?
>
> It may have something to do with change tracking, try setting
> "eclipselink.weaving.changetracking" to false to test if this is the case.
>
> It may have something to do with the variable init, try moving this to the
> constructor to see if it changes things.
>
>
>
> Jan Vissers wrote:
> >
> > Sorry - hit sent far to early. Trying it again
> >
> > Hi,
> >
> > I've noticed (at least one) issue with static weaving, using
> > EclipseLinkM6. The issue is with a OneToMany mapping as stated here:
> >
> > public class IndustrialFamily extends BaseEntity {
> > ...
> > @OneToMany(mappedBy = "industrialFamily", cascade = PERSIST)
> > private List<DisplayedFamilyCharacteristic>
> > displayedFamilyCharacteristics = new
> > ArrayList<DisplayedFamilyCharacteristic>();
> > ...
> >
> > public void addDisplayCharacteristic(DisplayedFamilyCharacteristic
> > displayCharacteristic) {
> > displayCharacteristic.setIndustrialFamily(this);
> > displayedFamilyCharacteristics.add(displayCharacteristic);
> > }
> >
> > The other end is mapped like:
> >
> >
> > public class DisplayedFamilyCharacteristic extends BaseEntity {
> > ...
> > @ManyToOne
> > @JoinColumn(name = "family_id", referencedColumnName = "ID")
> > private IndustrialFamily industrialFamily;
> >
> >
> >
> > In our code we call this operation on the IndustrialFamily class:
> >
> > addDisplayCharacteristic(...);
> >
> > With statically woven classes, no object is persisted. When we build our
> > app without static weaving, everything works beautifully.
> >
> > Any ideas why this happening.
> > Thanks,
> > Jan.
« Return to Thread: Static weaving issue? New object not persisted
| Free embeddable forum powered by Nabble | Forum Help |