Search within Java in General
Register / Login
Win a copy of
TDD for a Shopping Website LiveProject
this week in the
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Java in General
How to update child table data using parent reference in eclipselink?
posted 7 years ago
Number of slices to send:
Optional 'thank-you' note:
private Integer space;
@OneToMany(mappedBy = "userid",cascade = CascadeType.PERSIST)
private Collection<Externalstoragecredentials> externalstoragecredentialsCollection;
this is parent entity
@JoinColumn(name = "userid", referencedColumnName = "id")
@ManyToOne(cascade = CascadeType.PERSIST)
private Dpatchuser userid;
this is child entity
can you give named query to update child table data.
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
Boost this thread!
Entity object not getting persisted: new object was found through a relationship that was not marked
Cascade Type problem
make a entity class rows read-only in JPA
Saving database records problem
JPA: Cascade delete for join tables with composite key