-->
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.  [ 6 posts ] 
Author Message
 Post subject: Synchronization Problem
PostPosted: Fri Oct 12, 2007 4:26 am 
Beginner
Beginner

Joined: Thu Feb 08, 2007 11:11 am
Posts: 24
Location: India
Hibernate version : 3.2

Name and version of the database : Oracle 10g

I'm selcting data from a table by a mapping file which is having a Composite Element and my session flush level is auto.

I'm just trying to select data from the table, hibernate internally trying to syncronize by continuously inserting and deleting data from the associated table, which is described under the composite element tag.

My problem is, hibernate is trying to delete data first, which is not happenin, then it is trying to insert data in the table, which is happening. Ultimately it is increasing my table data, nothing else.

I can stop this by setting the flush mode to Manual, but why deletion is happening, even there is no exception!!!!!

Why?

Some body please explain this to me.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 12, 2007 9:49 am 
Beginner
Beginner

Joined: Tue Aug 14, 2007 6:29 pm
Posts: 27
Location: chicago
Are you seeing this behaviour when you initialize hibernate?

If that is the case , check for this,

<attribute name="Hbm2ddlAuto">create-drop</attribute>


in hibernate-service.xml , if it is there just remove this attribute.

Sun


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 13, 2007 4:33 am 
Beginner
Beginner

Joined: Thu Feb 08, 2007 11:11 am
Posts: 24
Location: India
I'm not using the hbm2ddl at all. I've not enabled it. This is happening when i'm trying to fetch the data from a table which is associated with another table with one to many relation. Like

Table A ---- One to Many ----- Table B.

in hbm file table B properties has been described as a composite element of table A. Now I'm trying to fetch the data from Table A. At that time hibernate is trying to delete data from table B first then again inserting data into B. Deletion is not happening but inserting is done, ultimately it increases my table rows.

Please give me some explaination, why deletion is not happening ? and if it is not done then why there is no exception??????
Supriyo


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 13, 2007 8:55 pm 
Beginner
Beginner

Joined: Tue Aug 14, 2007 6:29 pm
Posts: 27
Location: chicago
Can you post your hbm.xml?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 13, 2007 8:56 pm 
Beginner
Beginner

Joined: Tue Aug 14, 2007 6:29 pm
Posts: 27
Location: chicago
Did you mention any cascade option ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 15, 2007 9:10 am 
Beginner
Beginner

Joined: Thu Feb 08, 2007 11:11 am
Posts: 24
Location: India
Nope dude.
I've not mentioned any cascade option.


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

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.