-->
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.  [ 9 posts ] 
Author Message
 Post subject: Replacing the default EntityPersister
PostPosted: Thu Jul 29, 2004 3:35 pm 
Newbie

Joined: Mon Dec 15, 2003 3:34 pm
Posts: 18
Hi folks

I'm wondering if it is possible to replace the default persiter class (EntityPersister) by a custom subclass I have created, in a way that would affect all the mappings (without having to put the persister parameter in every hbm.xml).

This would be very usefull because I will use this custom persister for all objects in my domain.

_________________
Gabriel C. Oliveira
Sumersoft Technology, Brazil


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 29, 2004 3:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
<class persister="..."/>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 29, 2004 5:13 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
You can maybe manipulate the DOM tree before building the configuration.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 29, 2004 5:31 pm 
Newbie

Joined: Mon Dec 15, 2003 3:34 pm
Posts: 18
OK. Thanks for the quick answer.

And, what about collections? Is it possible to replace collection persisters somehow?

_________________
Gabriel C. Oliveira
Sumersoft Technology, Brazil


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 29, 2004 5:58 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
same way


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 30, 2004 8:56 am 
Newbie

Joined: Mon Dec 15, 2003 3:34 pm
Posts: 18
michael wrote:
You can maybe manipulate the DOM tree before building the configuration.


Sorry, I didn't get it.

What exactly do you mean by "DOM tree" in your post?

Thank you.

_________________
Gabriel C. Oliveira
Sumersoft Technology, Brazil


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 30, 2004 9:13 am 
Newbie

Joined: Mon Dec 15, 2003 3:34 pm
Posts: 18
gab.co wrote:
OK. Thanks for the quick answer.

And, what about collections? Is it possible to replace collection persisters somehow?


gavin wrote:
same way


Do you mean I should put a "persister" parameter in a <set> tag (for instance) to specify my custom persister class for that collection? (which would probably be a subclass of net.sf.hibernate.collection.BasicCollectionPersister)

I'm asking this because I read another post (http://forum.hibernate.org/viewtopic.php?t=557) that seems to tell the opposite.

Thank you again.

_________________
Gabriel C. Oliveira
Sumersoft Technology, Brazil


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 30, 2004 12:13 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
<!ATTLIST set persister CDATA #IMPLIED>


Um, why don't you just try it, instead of arguing with me


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 30, 2004 1:15 pm 
Newbie

Joined: Mon Dec 15, 2003 3:34 pm
Posts: 18
gavin wrote:
<!ATTLIST set persister CDATA #IMPLIED>


Um, why don't you just try it, instead of arguing with me


Yes, you are right!

It happens I was not using the latest version, and now (after updateting) I found this in the DTD.

Thank you very much for your attention. I use to read this forum very often and I'd like say you are very kind answering so many questions every day about a free product.
I'm also deeply sorry for this last stupid post. (I really mean it)

Hibernate has a huge legion of fans and users in Brazil! It is one of the most discussed subjects in many Java user groups and seminars.

Congratulations.

_________________
Gabriel C. Oliveira
Sumersoft Technology, Brazil


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