hi,
I am doing a application that needs multi-clumn index.
I explain the thing:
I have user and group tables as well as objects.
In the user Object, userid is the primary key..
In the group Object, i want to make userid and groupid as index.
I made index named as "grp_usr_id" in the sqlserver db (groups table)
I did like this:
<class name="com.meru.gmt.bo.groups.GroupsBean" table="usergroup">
<id name="groupId" type="java.lang.String" column="groupid" index="grp_usr_id">
<generator class="increment"/>
</id>
<property name="groupName" index="grp_usr_id">
<column name="groupName" />
</property>
<many-to-one name="users" insert="false" update="false" class="com.meru.gmt.bo.users.UsersBean" not-null="true" lazy="false" >
<column name ="userid"/>
</many-to-one>
</class>
but i got the mapping error on server displayed as:
ERROR [XMLHelper] Error parsing XML: XML InputStream(6) Attribute "index" must be declared for element type "id".
help me...
Thanks in advance..
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html