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.  [ 4 posts ] 
Author Message
 Post subject: Regarding HQL Queries
PostPosted: Tue Dec 26, 2006 10:55 am 
Newbie

Joined: Tue Dec 26, 2006 10:47 am
Posts: 3
Location: Hyderabad
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html

In HQL Statement
How to use SET PARAMERTS LIST


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 28, 2006 5:33 am 
Newbie

Joined: Mon Dec 18, 2006 9:49 am
Posts: 2
Location: hyderabad
hai suman,
did u written the mapping file for this collection..
like

<set name="testset" inverse="true">
<key column="ID"/>
<one-to-many class="Namespace.child,Assemblyname"/>
</set>

or u want to display the selected parameters?

any way
if u want to display the selected parameters ...then go for

Iquery query= session.CreateSqlQuery(.............)

ok..this may work for u...
suneel.[/b]


Top
 Profile  
 
 Post subject: How to write inner joins in HQL
PostPosted: Thu Dec 28, 2006 2:17 pm 
Newbie

Joined: Tue Dec 26, 2006 10:47 am
Posts: 3
Location: Hyderabad
Hi All

I have a query in which i need to use the Inner join in a HQL
for eg:


i have a class which consits of a line items says marks
class Student
{
private IList<Marks> _marks =new List<Marks>();
}

how can i get the inner join query and what are the key words be used in the HQL for writting this query


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 28, 2006 2:35 pm 
Newbie

Joined: Tue Dec 26, 2006 10:47 am
Posts: 3
Location: Hyderabad
vsuneeldot wrote:
hai suman,
did u written the mapping file for this collection..
like

<set name="testset" inverse="true">
<key column="ID"/>
<one-to-many class="Namespace.child,Assemblyname"/>
</set>

or u want to display the selected parameters?

any way
if u want to display the selected parameters ...then go for

Iquery query= session.CreateSqlQuery(.............)

ok..this may work for u...
suneel.[/b]



hai suneel

firstly thank u for answering the question i posted


but
i think u did not understand my query
for eg:


in student and marks example
if i

select * from student s where s.Grade=?

here in the place of question marik
i have a array list of parameters like {A,A+,B}

can i give the whole set of parameters
by using "SetParameterList" Keyword in CreateQuery ????


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