hibernate update JPA foregin key

Posted by cometta on Stack Overflow See other posts from Stack Overflow or by cometta
Published on 2010-03-18T07:21:30Z Indexed on 2010/03/18 7:41 UTC
Read the original article Hit count: 385

Filed under:
|
|

my jpa look like below

public class TESTClass implements Serializable {

...
private String name;
@EmbeddedId
protected IssTESTPK issTESTPK;

    @JoinColumns({@JoinColumn(name = "DIVISION_CODE", referencedColumnName = "DIVISION_CODE", nullable = false , insertable = false, updatable = false), @JoinColumn(name = "SURVEY_NUM", referencedColumnName = "SURVEY_NUM", nullable = false, insertable = false, updatable = false)})
    @ManyToOne(optional = false)
    private IssDivision issDivision;

}

if i make change to 'name' and call merge, it able to update into database, but when i change issDivision, and call merge, it doesnt update database. how to solve this?


does it related to because i'm using embededId (composite primary keys) ?

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate