-->
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.  [ 3 posts ] 
Author Message
 Post subject: excluding properties from classes
PostPosted: Wed Mar 21, 2007 1:25 pm 
Newbie

Joined: Wed Mar 21, 2007 1:12 pm
Posts: 19
Hi all,

I am new to hibernate and I am using a top-down approach with hibernate-annotations (I am trying to get hibernate to generate the database schema for me, from my project's classes).
I am trying to persist only one class. I get an exception like this:
org.hibernate.MappingException: Could not determine type for: mater.MaterDisplay, for columns: [org.hibernate.mapping.Column(md)]

MaterDisplay 'md' is an attribute of the class I am persisting. Is there an annotation to exclude attributes from persistence?
Moreover, shouldn't hibernate try to map only the attributes which don't have public getter and setter?

Thanks in advance,
Rui Lopes


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 21, 2007 1:41 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
either make your attribute transient or use @Transient
Hibernate map all attributes or getters (depending on the position of @Id) regardless of their accessibility, as per the spec

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 21, 2007 2:01 pm 
Newbie

Joined: Wed Mar 21, 2007 1:12 pm
Posts: 19
Got It, thanks :)


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