-->
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.  [ 6 posts ] 
Author Message
 Post subject: Is Hibernate the right solution for me...
PostPosted: Tue Sep 07, 2004 4:07 am 
Beginner
Beginner

Joined: Tue Sep 07, 2004 3:58 am
Posts: 23
Hi everyone...

Im sorry to bother you, but i am totally new to hibernate and i want to know if its the right solution for me.

The point is that my applications mysql database never actually deletes data, cause it has to implement a history function, e.g. show all data like it was 4-8-2002 or so....

So each table in my model has two coloumns with timestamps - on for creation time and one for the "delete" time....

At first look i wonder if hibernate hasnt to many uncontrollable features... i read about saveorUpdate() and other methods where i dont know if i can configure them that precisely so it handles persistence the way i need it...


Plz anyone help me.... i dont get the clue out of the doc....


Thx...

J

_________________
People keep asking me if i know Tyler Durden....


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 4:12 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
you can use hibernate,
you'll have a business method called appDelete which will call myObject.setDeleteTime()... and only "update" in db, easy not?

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject: @anthony...
PostPosted: Tue Sep 07, 2004 4:21 am 
Beginner
Beginner

Joined: Tue Sep 07, 2004 3:58 am
Posts: 23
thx alot...

So i will give it a try... i just dont have the time to read the 150 page docu just to realize "No, not appropriate...."

so a big THX...

J

_________________
People keep asking me if i know Tyler Durden....


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 4:30 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
Quote:
In anthony we trust....


better trust in Hibernate ;)

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 19, 2005 5:35 am 
Beginner
Beginner

Joined: Tue Oct 07, 2003 11:36 am
Posts: 46
Location: Rennes, France
Is there a fancy/possible way to add a criteria to every select request (and joins !) ?

It is quite easy to change the delete statement by an update statement, but I can't imagine post-filtering results of a query, to check if the "deleted flag" is not set, especially for the associated objects of the graph.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 19, 2005 10:45 am 
Newbie

Joined: Mon Aug 08, 2005 5:10 am
Posts: 5
I think you need to seriously consider organising your data differently. Historic data should be hived off to dedicated tables.

Paul.


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