Hi all,
I am using hibernate search with lucene. I need to create index of DomainTag
object which have only one composite key. I am unware how to define the
annotations for the composite key in DomainTag (pojo) class.
If any one can help , please help me. Thanks in advance.
My DomainTag.hbm.xml file is as follows:
--------------------------------------****************************----------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.2
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="com.test.manager.DomainTag"
table="domaintag"
>
<composite-id>
<!-- Associations -->
<!-- derived association(s) for compound key -->
<!-- bi-directional many-to-one association to Item -->
<!-- Associations -->
<!-- derived association(s) for compound key -->
<!-- bi-directional many-to-one association to Item -->
<key-many-to-one
name="topic"
class="com.test.manager.DomainTest">
<column name="domain_id" />
</key-many-to-one>
<!-- bi-directional many-to-one association to Tag -->
<key-many-to-one
name="tag"
class="com.test.manager.Tag">
<column name="tag_id" />
</key-many-to-one>
</composite-id>
</class>
</hibernate-mapping>
--------------------------------------****************************----------------------------
--
View this message in context:
http://www.nabble.com/I-am-unable-to-create-index-of-an-object-having-composite-key-tp23211575p23211575.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]