Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Cascade type ALL not propagating (persist does not propagate to associated Entity)
Cascade type ALL not propagating [message #509438] Fri, 22 January 2010 13:01 Go to next message
Carlos Conti is currently offline Carlos Conti
Messages: 26
Registered: January 2010
Junior Member
Hi all,

I have three classes A,B,C, with attached OneToMany relationships from A to B and OneToOne from B to C

A < B : bidirectional
B->C : unidirectional (from B to C)

Have settled Cascade types for all of them to ALL

My problem is that when calling persist(Object) on A, stores only A in the database, whereas when calling persist on object of type B, writes all of them (A,B and C)

Since I have set Cascading to ALL for all of them, how is it possible that calling persist on A, doesn't store all the objects?

Thanks in advance.
Carlos.
Re: Cascade type ALL not propagating [message #509443 is a reply to message #509438] Fri, 22 January 2010 13:07 Go to previous message
Carlos Conti is currently offline Carlos Conti
Messages: 26
Registered: January 2010
Junior Member
ups! sorry already solved.

the correspondent set method a.setB(b), had an empty body. So the field was not being populated.

My mistake.
Regards,
Carlos.
Previous Topic:JOINED-@Inheritance, MappedSuperclass with multiple @Id fields
Next Topic:Java Persistence Experts Teaches JPA 2.0 at GIDS 2010
Goto Forum:
  


Current Time: Thu Oct 02 16:39:36 GMT 2014

Powered by FUDForum. Page generated in 0.02317 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software