-->
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.  [ 2 posts ] 
Author Message
 Post subject: Retrieving a list of objects using Criteria
PostPosted: Fri Nov 17, 2017 1:27 am 
Newbie

Joined: Fri Nov 17, 2017 1:25 am
Posts: 1
Im having an issue retrieving a list of objects using Criteria.

My code:
Code:
session = HibernateFactory.getSession();
Criteria criteria = session.createCriteria(Client.class);
List clients= criteria.list();


The last line I get:

Code:
[ERROR] 2017-11-17 00:06:36.474 [main] SetterMethodImpl - HHH000123: IllegalArgumentException in class: com.itrack.model.domain.Name, setter method of property: firstName
[ERROR] 2017-11-17 00:06:36.474 [main] SetterMethodImpl - HHH000091: Expected type: java.lang.String, actual value: com.itrack.model.domain.Donor


Sounds like its having some issue with the setter method. Sounds like its trying to set firstName with a Donor.
I'm lost.

Thanks


Top
 Profile  
 
 Post subject: Re: Retrieving a list of objects using Criteria
PostPosted: Fri Nov 17, 2017 2:45 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1630
Location: Romania
You forgot to add your mappings so we have an idea of what you are doing.


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