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

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 
-- 
View this message in context: http://www.nabble.com/Static-weaving-issue--New-object-not-persisted-tp18024480p18071401.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top