3

I would like to add a column to the association table using service builder on liferay!

<entity name="entity1" local-service="true" remote-service="false">

    <column name="entity1Id" type="long" primary="true" id-type="sequence"

        id-param="id_entity1_sequence"></column>

    <column name="name" type="String"></column>

    <column name="entity2s" type="Collection" mapping-table="entity1_entity2"
        entity="entity2"></column>

        <finder name="Name" return-type="entity1" unique="true">
        <finder-column name="name"></finder-column>

    </finder>

</entity>

<entity name="entity2" local-service="true" remote-service="false">

    <column name="entity2Id" type="long" primary="true" id-type="sequence"

        id-param="id_entity2_sequence"></column>

    <column name="header" type="String"></column>

    <column name="value" type="String"></column>

    <column name="entity1s" type="Collection" mapping-table="entity1_entity2"
        entity="entity1"></column>


</entity>

I mean I need to add a column to entity1_entity2 table

Do you have any suggestions?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
user3429578
  • 1,093
  • 3
  • 12
  • 21

1 Answers1

0

I think you would take a look this tutorial (it's splitted in 3 parts):

Regards.

Carlos Durán
  • 186
  • 10
  • It's not realy what I was looking for, It's nearly similar but in my case I'm looking to add a column to the mapping-table course_student!! can get my point? – user3429578 Dec 19 '14 at 10:25
  • In the first part, the tutorial says that 3 tables are created: | Table meera_Students: registries for students | Table meera_Courses: registries for courses | Table meera_Students_Courses: registries for relations course-student | Isn't it the target that you are looking for? – Carlos Durán Dec 19 '14 at 11:37
  • first I would like to think you Mr Carlos for your help but what I'm looking for is to add an attribute (or column) to the meera_Students_Courses table!!! which means I the meera_Students_Courses table should contain : (Pk(course_PK,student_PK),anotherColumn) – user3429578 Dec 19 '14 at 14:09