-->
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.  [ 1 post ] 
Author Message
 Post subject: Property access annotation "could not resolve property"
PostPosted: Wed Aug 19, 2009 9:04 pm 
Newbie

Joined: Thu Jul 23, 2009 11:48 am
Posts: 9
I have an EmployerInfo class which holds a List of ContactPoints. I want Hibernate to treat the ContactPoints as a Set, so I'm using a property annotation to define the mapping, like so:
Code:
@Entity
@Table(name = "general.zjp_employers")
public class EmployerInfo extends PersonInfo{
  @Transient
  List<ContactPoint> contactPointsList;

  @OneToMany(mappedBy="employerInfo")
  public Set<ContactPoint> getContactPointsSet() {
    return new HashSet<ContactPoint>(contactPointsList);
  }
}

However, when I try to run a query on EmployerInfo class, like
Code:
select employerInfo EmployerInfo as employerInfo inner join employerInfo.contactPointsSet as contactPoints where contactPoints.contactInfo = ?

I get "org.hibernate.QueryException: could not resolve property: contactPointsSet of: com.package.EmployerInfo". Can someone please explain what I'm missing here?

Thanks -- Dane


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.