*pk*: The primary key for the entity. It is*optional*and only needed when using delta-imports. It has no relation to the uniqueKey defined in schema.xml but they both can be the same.

When using in a nested entity is the PK the primary key column of the join table or the key used for joining? For example

Say I have table /foo/ whose primary id is id and table /sub_foo/ whose primary key is also id. Table sub_foo also has a column named/foo_id/ that is used for joining /foo/ and /sub_foo/.

Should it be:

 <entity name="foo" pk="id" query="select * from foo"...>
     <entity name="sub_foo" pk="foo_id" deltaQuery="select foo_id from sub_foo 
where..."/>
 </entity>

Or:

 <entity name="foo" pk="id" query="select * from foo"...>
    <entity name="sub_foo" pk="id" deltaQuery="select foo_id from sub_foo 
where..."/>
 </entity>


Thanks for your help


Reply via email to