-->
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.  [ 5 posts ] 
Author Message
 Post subject: Why does hibernatetool care about the persister attribute?
PostPosted: Wed Feb 28, 2007 8:46 pm 
Newbie

Joined: Tue Jun 07, 2005 10:45 pm
Posts: 15
Location: Sydney
We have specified the <class> persister attribute for some .hbm.xml files.

When we do a clean build we hit a 'chicken or the egg' problem.

We can't compile the persister since it relies on other classes, which are blown are by our 'clean' ant task.

We also can't run hiberatetool since it goes looking for the compiled persister class and of course its not there -- since it was 'clean'ed.

So, since the persister attribute doesn't (seem to) affect code generation, why does hibernatetool care about it?

Is there some way to tell hibernatetool to sort of ignore the persister attribute, since it doesn't do anything with it (as far as I can tell).

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 19, 2007 11:02 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hard one to solve if its true...the persiter is needed for generating hbm.xml. i think it is already in jira; but please check.

It is something that requires a fix in how hibernate core parses mapping files.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 19, 2007 11:03 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hack/workaround: have a stubbed set of classes for the persister that just implements the interface and put that on the classpath when you use the codegeneration facilities.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 19, 2007 4:37 pm 
Newbie

Joined: Tue Jun 07, 2005 10:45 pm
Posts: 15
Location: Sydney
Quote:
.the persiter is needed for generating hbm.xml


but it doesn't affect the generated classes whatsoever.

We can look at the stubbed classes approach but would imagine it is probably easier if hibernate tools are changed to ignore the persister attribute contents, i.e. don't verify if its an existing class, or at least provide some tool options to ignore validating whether classes not used by hibernate tool are on the classpath.

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 19, 2007 7:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes, and as i wrote that is hibernate core parsing this; so it is the core that needs to have this change.

_________________
Max
Don't forget to rate


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