Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Static weaving issue? New object not persisted

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.
> > 
> 
> 
> -----
> ---
> http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
> http://www.eclipse.org/eclipselink/
>  EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
> TopLink 
> Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
> http://wiki.oracle.com/page/TopLink TopLink 
> Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
> http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
> Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 



Back to the top