-->
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: Strange behaviour of Hibernate 1-level cache
PostPosted: Mon Oct 27, 2008 9:09 am 
Newbie

Joined: Mon Oct 27, 2008 8:41 am
Posts: 1
Hi,
I'm using Hibernate 3.0.5 with open-session-in-view model and have some problem with session cache.

Everything is happening inside one request.
In this request, first I select all Taxonomies(Taxonomy objects), then based on some other data, update these taxonomies and create new ones. When I create new taxonomies, first I assign associations to them and save them to database - but there are without names. In second step I take these taxomomies and assign generated name for them. when genearion process ends, I again execute "from Taxonomy where ....". Query return updated taxonomies, and newly created ones, but these newly created, they don't have their names (name is null). in this situation it is enough to refresh the page and everything is ok. But I don't know why this first time name is null. I tried to fix it and find out, that if I invoke "session.clear();" after generating taxonomies, everything work well but I sill don't understand it. Can anyone explain it to me?


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.