Joined: Tue Jul 04, 2006 8:56 pm Posts: 4
|
Hi, i have the follow model:
class Optional
{
....
public string Desc
{
get
{
...
}
set
{
...
}
}
...
}
class Auto
{
...
public IList<Optional> Optionals
{
get
{
...
}
set
{
...
}
}
...
}
My database:
Table Auto
Table Optional
Table AutoOptional with FKs for Auto Entity and Optional Entity. This is a association entity.
I have a form that produce a advanced query.
I want to make the same query sql in hql:
SELECT DISTINCT A.*
FROM Auto A INNER JOIN AutoOptional AO ON AO.Auto = A.Id
WHERE (:paramList IS NULL OR AO.Optional IN (:paramList))
Is it possible? How?
Thanks
Fábio Alves Domingues
Curitiba - PR - Brasil
|
|