Thanks to all of you guys for your answers.

Stefan: This works for an inner join, but not for a left/right outer
join afaik. You cannot translate an outer join to a where clause, can
you?

Fabio: I cannot have the relation in the mapping as the join is
defined at runtime by the user. I'm coding a query engine, which will
map a typed query definition tree into hql. My tables in Db don't have
any FK-relationships so mapping is not possible.

Cesar: That will be the last alternative if hql is not possible. hql
would save me a lot of work especially concerning DB abstraction.

On 7 Sep., 16:52, "Cesar Sanz" <[email protected]> wrote:
> What about plain SQL?
>
>   ----- Original Message -----
>   From: Fabio Maulo
>   To: [email protected]
>   Sent: Monday, September 07, 2009 7:19 AM
>   Subject: [nhusers] Re: HQL Join with unmapped entities
>
>   Note: You may don't have a relation in the domain model but you CAN have 
> the relation in the mapping.
>
>   2009/9/7 merrycoder <[email protected]>
>
>     Thanks for the answer, Fabio. Unfortunately this doesn't solve my
>     issue. In your example there is a mapping between the entities.
>     My entities don't have any relation mapping. I need to fully(!) define
>     the join clause from hql.
>
>     Greetings
>
>     Stefan Landgraf
>
>     On 6 Sep., 15:28, Fabio Maulo <[email protected]> wrote:
>     >http://fabiomaulo.blogspot.com/2009/05/nhibernate-210-hql-with-clause...
>
>     > 2009/9/6 merrycoder <[email protected]>
>
>     > > What I am looking for is a possibility to Join unmapped entities in
>     > > HQL resulting in an SQL  JOIN with user defined ON criteria.
>     > > In HQL the “join” will be transformed into a ON clause based on the
>     > > mapping of the property. As my entities have no relationship mappings
>     > > this doesn’t work for me.
>
>     > > What I need is something like
>
>     > > from Parent p
>     > > inner join p, Child c on p.Iid=c.FkIid
>     > > but this fails with “Path expected for join!”
>
>     > > Is there a bypass or other trick for this? Is there maybe a
>     > > possibility to define my own hql commands and inject them into the hql
>     > > processor?
>
>     > > Any help would be greatly appreciated!
>
>     > > Thank you
>
>     > > Stefan Landgraf
>
>     > --
>
>     > Fabio Maulo
>
>   --
>   Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to