I have a sync table that has the following fields:
TABLE NAME = SYNC
sync_id
created_dt
created_by
updated_dt
updated_by
is_dirty
is_new
is_deleted
The idea is that every table in my database would inherit from it since these are all common fields that i would need on tables anyway. So.... the sync table is the supertype and lets say CUSTOMER is the subtype.
when i create a new customer entity the sync_id is updated with the customer_id. This poses a problem since all tables will run over each others id's. The way i have them mapped is... the customer table has a foreign key constraint where the customer_id is the primary of the customer table but it is also a foreign key to the sync_id in the sync table.
This posting helped me get this far http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=4704&HighLight=1 but now I'm stuck.
So the question is.. how do i get unique id's in the sync table and still be able to match up the sync table rows with the rows from the other table joined to it ?
-Reginald