« Return to Thread: Static weaving issue? New object not persisted

Static weaving issue? New object not persisted

by Jan Vissers :: Rate this Message:

Reply to Author | View in Thread

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.




_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

 « Return to Thread: Static weaving issue? New object not persisted