I think index is just for scalar (lets say when you have a list or a map
with "map-key", or "index" in the old syntax).

I am not sure if you can use here the row-value-constructor syntax here, try
this:

from OrganisationNode node
inner join node.NodeNamePaths node_paths
where (:id, :mdbid) in indices(node_paths)



2010/8/24 zoranpro <[email protected]>

> Hello,
>
> I have problem to write HQL when DTO is having dictionary.
>
> This is how mapping is look like:
>    <map name="NodeNamePaths" table="SomeTable" cascade="all">
>      <key column="ID" />
>      <composite-index class="OrgID">
>        <key-property name="ID" />
>        <key-property name="ID_mdbID" />
>      </composite-index>
>      <element column="NamePath"/>
>    </map>
> And in DTO there is prop:  IDictionary<OrgID, string> NodeNamePaths
>
> I tried writing like this:
>
> from OrganisationNode node
> inner join node.NodeNamePaths node_paths
> where index(node_paths).ID = :id and index(node_paths).ID_mdbID
> = :mdbid
>
> Error that I get is:
> NHibernate.Hql.Ast.ANTLR.QuerySyntaxException: Exception of type
> 'Antlr.Runtime.NoViableAltException' was thrown.
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>

-- 
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