Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys,

I'm trying to add a composite index to the NHibernate mapping file so I do something like:
XML
<composite-index class="PossibleResource">
    <key-property  name="Operation_id"/>
    <key-property  name="Resource_id"/>
</composite-index>


But then, when I try to generate the DB I'm getting the following error:

The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'composite-index' in namespace 'urn:nhibernate-mapping-2.2'. List of possible elements expected: 'property, many-to-one, one-to-one, component, dynamic-component, properties, any, map, set, list, bag, idbag, array, primitive-array, join, subclass, joined-subclass, union-subclass, loader, sql-insert, sql-update, sql-delete, filter, resultset, query, sql-query' in namespace 'urn:nhibernate-mapping-2.2'.


What is the best practice to create a composite index in NHibernate?

Thanks,
Shai
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900