Login with  Log in with facebook
Hiring Manager? SIGN UP HERE
0

Hi all

         I have created three tables. Like :

Employee

       --id (PK)

Project

        --id (PK)

Employee_projects

        --id (PK)

        --employee_id (FK)

        --project_id (FK)

 

 

I want to use one-to-many mapping on Employee table. how to do it without Annotation.... 

In database additional column idx should not be created. Here I am using spring mvc framework.

 

 

Thanx in Advance

Reply as soon as possible

Abhendra Singh
08/09/2011 at 07:35
1 Answer
1
0

I got the answer. idx column is for indexing. It is created to manage index.

And code is same as the normal one to many mapping code...

 

 

<list name="project" table="employee_projects" cascade="all" lazy="false">

<key column="employee_id" />

<list-index></list-index>

<many-to-many unique="true" column="project_id" class="com.infoobjects.infomirror.entities.Project" />

</list>

Abhendra Singh
08/19/2011 at 06:21

If you want to post any answer to this forum then you need to log in.
Schedule a Demo

Schedule a Demo with us

Name *
Email *
Phone *
Company *
Details