-->
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: Using a composite class as a HQL parameter
PostPosted: Thu Nov 20, 2003 10:43 am 
Beginner
Beginner

Joined: Fri Oct 24, 2003 4:28 pm
Posts: 20
I've noticed I can use an entity as a paramter in a query like follows:
Code:
User user = new User("john");
session.find("from test.Group as group where group.user = ?",
                  user, Hibernate.entity(User.class));


I'd also like to use a composite class in my query, but I can't quite figure out what Type to pass in. For example:
Code:
class User {
   private Name name;
   Name getName() { return name; }
   void setName(Name name) { this.name = name; }
}

Name name = new Name("John");
session.find("from test.User as user where user.name = ?",
                  name, *** What is the Type? ***);


What do I pass in for type?

Thanks,
John


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 20, 2003 10:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Unfortunately, this is not supported (and won't be until Hibernate 2.2)


:(


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.