-->
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: How possible this update is not working?
PostPosted: Tue Mar 06, 2007 2:01 am 
Newbie

Joined: Wed Feb 07, 2007 7:55 pm
Posts: 18
I have read a quite few of other people's mysterious Hibernate problems on one forum. Now, I have my own few. Here is one of them.

Hibernate version:
3.2
Code between sessionFactory.openSession() and session.close():
Code:
      MyClass r = (MyClass) session.load(MyClass.class, i);
      r.setAttribute1(a1);
      session.flush();

The above code segment has been modified from the Spring HibernateTemplte class code.
Name and version of the database you are using:
PostgreSQL 8.1
The generated SQL (show_sql=true):
Code:
Hibernate:
    select
        my_class0_.id as id2_0_,
        my_class0_.producer_id as producer2_2_0_,
        my_class0_.trigger_date as trigger3_2_0_,
        my_class0_.content as content2_0_
    from
        bm_my_class my_class0_
    where
        my_class0_.id=?

I only see the above select statement, but not an insert statement. A similar updating code on another class works correctly. I fail to see any difference between these two updating, but one works while the other doesn't.

What can go wrong here?


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.