-->
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.  [ 2 posts ] 
Author Message
 Post subject: Session.find - executes update statement --why??
PostPosted: Tue Mar 16, 2004 5:35 pm 
Newbie

Joined: Fri Oct 17, 2003 12:40 pm
Posts: 16
Hibernate Version : 2.1
Database : Oracle 9i

When I execute a session.find(query), it works fine and I get the correct List. But when I flush the session, a "update" statement is executed. I don't understand why there is a update statement. There is no problem with other calls like..load, saveOrUpdate, delete. I am only having problem with "find". Any input is greatly appreciated.

My mapping file is :

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="class1" table="table1">
<id name="Id" column="Id" type="long" unsaved-value="-1">
<generator class="sequence">
<param name="sequence">seq</param>
</generator>
</id>
<version name="version" column="version" type="long"/>
<property name="name" column="name" type="string"/>

</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject: Re: Session.find - executes update statement --why??
PostPosted: Tue Mar 16, 2004 5:49 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Quote:
executes update statement


which one? have a trace?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.