-->
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: How to map views?
PostPosted: Thu Oct 06, 2005 7:04 am 
Regular
Regular

Joined: Thu Aug 28, 2003 10:54 am
Posts: 67
I am trying to map some classes to views which do not have any primary key columns. This makes reporting easier. However, eventhough the documentation says that if you leave out the name attribute of the id tag if the class has no identifier property I still get an SQLGrammarException warning about an invalid column name 'id'

This is with hibernate 3. Also the docs say that the type attribute is optional onthe id tag but when i leave it out I get

org.hibernate.MappingException: must specify an identifier type


Any comments?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 06, 2005 7:22 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
View without identifier is not a relation and it can not be mapped.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 06, 2005 9:04 am 
Regular
Regular

Joined: Thu Aug 28, 2003 10:54 am
Posts: 67
hmmm. Ok, I used a composite-id on all the fields and it worked fine. Seems like a good use for it;)


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.