-->
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.  [ 8 posts ] 
Author Message
 Post subject: MapKey Cannot Map @Id
PostPosted: Thu Nov 17, 2005 2:13 am 
Regular
Regular

Joined: Thu Feb 17, 2005 1:58 am
Posts: 63
class Landmark
{
@OneToMany
@JoinColumn(name="landMarkOid")
@MapKey(name="locale")
public Map<String,LandMarkData> getLandmarkData()
}

class LandMarkData
{
@Id
public String getLandMarkOid();

@Id
public String getLocale();
}

***Exception***
org.hibernate.AnnotationException: Map key property not found: LandMarkData.locale
at org.hibernate.cfg.annotations.MapBinder.bindKeyFromAssociationTable(MapBinder.java:68)
at org.hibernate.cfg.annotations.MapBinder.access$000(MapBinder.java:32)
at org.hibernate.cfg.annotations.MapBinder$1.secondPass(MapBinder.java:55)

The exception goes away if @Id for getLocale() is removed. Is this a Hibernate bug?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 8:46 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Seems to. Please open a JIRA issue with a minnimal working test case.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 11:36 am 
Beginner
Beginner

Joined: Wed Dec 17, 2003 2:54 pm
Posts: 26
Location: Oslo, Norway
emmanuel wrote:
Seems to. Please open a JIRA issue with a minnimal working test case.


Which ticket number did this get?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 11:49 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
http://opensource.atlassian.com/projects/hibernate/browse/ANN-156

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 12:28 pm 
Beginner
Beginner

Joined: Wed Dec 17, 2003 2:54 pm
Posts: 26
Location: Oslo, Norway
emmanuel wrote:


Great. Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 12:51 pm 
Beginner
Beginner

Joined: Wed Dec 17, 2003 2:54 pm
Posts: 26
Location: Oslo, Norway
It seems I need this fix to get my schema mapped correctly.

- will beta7 be released within the next week or so?
- if not, what is the current repository contents working against? Hibernate 3.1RC3 wasn't compatible with beta6. Should I go for RC3?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 7:01 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I'm releasing

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 7:10 am 
Beginner
Beginner

Joined: Wed Dec 17, 2003 2:54 pm
Posts: 26
Location: Oslo, Norway
emmanuel wrote:
I'm releasing


Even better! :-)


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