-->
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: HQL to check in a subquery if column exits in another table
PostPosted: Wed Sep 26, 2007 10:54 pm 
Newbie

Joined: Wed Sep 26, 2007 9:53 pm
Posts: 3
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.0

I have the following tables:
--------
Vendor
--------

-id
-name
-city
...
...


Model class has
----------------------
Vendor.java
----------------------

-get/setID
-get/SetName
-get/SetCity
-hasHistroy()
-setHistory()


--------
History
--------

-id
-vendorId
-fileName
-initialVal
-changedVal



Model class has
--------------------
History.java
--------------------

get/setID()
get/setVendorID()
...
...




I need HQL query that gives in me a list of Vendors and also populate the vendor hasHistory() field based on "does vendor have atleast one column in the History table.

Can anybody sugget how the query should look like.

Thanks,
Malini Kesavan

_________________
Thanks,
Malini


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.