-->
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.  [ 4 posts ] 
Author Message
 Post subject: How do I get Hibernate to IGNORE properties in my class?
PostPosted: Wed Feb 11, 2004 5:45 pm 
Newbie

Joined: Mon Dec 22, 2003 2:39 pm
Posts: 8
I have hbm2java using <meta generated-class ...>
to generate a Hibernate aware abstract CatBase class
which I then extend to Cat. When I add variable x
(which I do not want to persist) to Cat, Hibernate barfs.

Is there a way I can tell Hibernate to ONLY
pay attention to the properties I've explicitly mapped?

Thanks,
Sandy


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 5:54 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Ahem, Hibernate does take only explicitly mapped properties into account. Could you probably be a bit more specific than "Hibernate barfs"?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 7:49 pm 
Newbie

Joined: Mon Dec 22, 2003 2:39 pm
Posts: 8
Sorry... It's been a V*E*R*Y long day.
Hibernate is a great tool but after awhile I get frustrated
trying to figure out how to do what I want with it.
(Sure wish that Manning book was available!)

On closer inspection, what I really need to know is
what is the way for ME to get at the list of fields
Hibernate knows about for a particular mapped class.
Could you point me at the right API call for that?

Thanks for your help (and patience).

Sandy


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 11, 2004 10:11 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
SessionFactory.getClassMetadata()


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