-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: save the transient instance before flushing
PostPosted: Sun Jun 17, 2007 2:16 pm 
Newbie

Joined: Wed May 30, 2007 1:22 am
Posts: 7
Hi ,

iam using Hibernate/JPA , i have self relation with Composite forign key , i can't do the DML operations on the Assosiation Fields , so i made them read-only (inseartable and updatable false) , and i created @Column for that field ,
@ManyToOne(fetch= FetchType.EAGER)
@JoinColumns({@JoinColumn(name = "ELM_TYPE",referencedColumnName = "ELM_TYPE",insertable = false, updatable = false),
@JoinColumn(name = "PARENT_SEG_IDX",referencedColumnName = "SEG_IDX",insertable = false, updatable = false)})
private ElmSegmentList elmSegmentList;

but on certain cases it gives me the following exception :
Error while commiting the transaction object references an unsaved transient instance - save the transient instance before flushing: com.omnix.gsis.setup.model.ElmSegmentList.elmSegmentList -> com.omnix.gsis.setup.model.ElmSegmentList

but it works fine if i provided the values for both the Column and the ALL of the assosiation fields , is this sense and why !!!!???

Regards,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.