| Author |
help me with mapping
|
sam bartl
Ranch Hand
Joined: Oct 29, 2010
Posts: 43
|
|
I have a table
EA_MPF(
SYS_MPF_ID,
SYS_AUDIT_PROG_ID,
SYS_FINDING_ID
)
EA_MPF_NON_LEAD_PROGS(
SYS_MPF_ID,
SYS_AUDIT_PROG_ID
)
EA_AUDIT_PROGRAM(
SYS_AUDIT_PROG_ID,
...
..
..
)
here is the entity for EA_MPF table
Entity for EA_AUDIT_PROGRAM is pojo with all getter and setter methods called EaAuditProgram
Entity MultiProgramFinding has a leadEaAuditProgram and nonLeadEaAuditPrograms both these properties are mapped to EaAuditProgram , in order to have bidirectional relation in EaAuditProgram I have to map MultiProgramFinding twice , is this how I should map or is there a better way please advice me ?
also I posted this question in spring forums.
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
in order to have bidirectional relation in EaAuditProgram I have to map MultiProgramFinding twice...
How have you mapped this in "EaAuditProgram", can you show that part of the code? What's the issue you are having if it's not working?
|
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
|
 |
sam bartl
Ranch Hand
Joined: Oct 29, 2010
Posts: 43
|
|
Vijitha Kumara wrote:
in order to have bidirectional relation in EaAuditProgram I have to map MultiProgramFinding twice...
How have you mapped this in "EaAuditProgram", can you show that part of the code? What's the issue you are having if it's not working?
I haven't mapped yet and I dont have any issue, what I am asking is whether it is nice desing to map an entity twice in other entity in mycase in eaAuditprogram I have to map MultiProgramFinding twice , I am asking suggestions if this can be done in a better way ?
|
 |
Vijitha Kumara
Bartender
Joined: Mar 24, 2008
Posts: 3670
|
|
...what I am asking is whether it is nice desing to map an entity twice in other entity
If the business problem wants it that way or you cannot avoid it then you have no choice. But that may solely depends on the problem and the design you have.
|
 |
 |
|
|
subject: help me with mapping
|
|
|