-->
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: UserType is making entity dirty
PostPosted: Wed Sep 29, 2010 8:10 pm 
Newbie

Joined: Wed Sep 29, 2010 8:01 pm
Posts: 1
I have a custom UserType to convert mysql timestamps in the '0000-00-00 00:00:00' format to null. The problem with using the custom UserType is it makes the entity dirty. Since it is dirty it does update statements unnecessarily.

I have tried using interceptors but they don't always work. It is trying to update the record in the table when i try to get the result from the query.

I have also evicted the entity but that doesn't stop the initial update.

I am using hibernate inside a ejb by using an EntityManager.

I am using ejb 3.

hibernate version: 3.3.1
mysql version 5.1

Does anyone know how to get it to not try to run update statements when trying to load the entity?


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.