-->
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: Selecting without updating
PostPosted: Wed Jan 12, 2005 11:13 am 
Beginner
Beginner

Joined: Fri Jan 07, 2005 2:47 pm
Posts: 45
Hibernate version:
Hibernate2

Mapping documents:

Code between sessionFactory.openSession() and session.close():
n/a
Full stack trace of any exception that occurs:

Name and version of the database you are using:
Oracle 9
The generated SQL (show_sql=true):
ok
Debug level Hibernate log excerpt:



This is part of my xml file. Since I have two properties with date each time I select to all users hibernate
update automatically the user table. So the date fields are changed. How can I select without updating.

Is someone can help??

Thanks in advance.

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping
package="SAP.BusinessObjects"
default-cascade="save-update">

<class name="User" table="X_REQUESTORS">

<id name="userid"
column= "REQ_ID"
type="java.lang.String"
length="20">
<generator class="SAP.DAOObjects.SeqGeneratorUser"/>
</id>

<property name="lastname"
type="java.lang.String"
length="50"
not-null="true"
column="LAST_NAME"
update="true"
insert="true"/>

<property name="firstname"
type="java.lang.String"
length="50"
not-null="true"
column="FIRST_NAME"
update="true"
insert="true"/>


<property name="currentdate"
type="java.util.Date"
column="CHANGED_ON"
not-null="false"
update="true"
insert="true"/>


<component name="pswd" class="Password">

<property name="username"
type="java.lang.String"
length="10"
not-null="true"
column="USERNAME"
update="true"
insert="true"/>

<property name="expireddate"
type="java.util.Date"
not-null="false"
column="EXPIRED"
update="true"
insert="true"/>

</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject: Selecting without updating
PostPosted: Wed Jan 12, 2005 1:15 pm 
Beginner
Beginner

Joined: Fri Jan 07, 2005 2:47 pm
Posts: 45
I found the problem thanks anyway


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.