dcsimg
foreign key relation as primary key with xDoclet tags
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, September 11, 2003 04:30 AM

Hi all My operatorLog bean has a relation to operator bean. Now I want to define the operator foreign key (in operatorLog) also as primary key. The only way I found is to define the foreign key as persistent field and set the @ejb.pk-field definition: @ejb.pk-field @ejb.persistent-field @ejb.interface-method @ejb.persistence column-name="operatorName_fk" @ejb.interface-method view-type = "local" @ejb.relation . name = "operatorLog-operator" . role-name = "operatorLog-knows-operator" . target-ejb = "SecurityOperator" . target-role-name = &quo   More>>

Hi all

My operatorLog bean has a relation to operator bean. Now I want to define the operator foreign key (in operatorLog) also as primary key.
The only way I found is to define the foreign key as persistent field and set the @ejb.pk-field definition:


@ejb.pk-field

@ejb.persistent-field

@ejb.interface-method

@ejb.persistence column-name="operatorName_fk"

@ejb.interface-method view-type = "local"


@ejb.relation

. name = "operatorLog-operator"

. role-name = "operatorLog-knows-operator"

. target-ejb = "SecurityOperator"

. target-role-name = "operator-has-operatorsLogs"

. target-multiple = "yes"


@jboss.relation

. fk-column = "operatorName_fk"

. related-pk-field = "operatorName"


I'm sure there is a much better way to do this!
Can anybody help me?
Thanks a lot!    <<Less
About | Sitemap | Contact