digitalenigma
Member
- Joined
- Mar 27, 2003
- Messages
- 6
Hi everyone,
I have two tables that implement value generating sequences for the ID fields (at the data source level, not the data table). The two tables are aligned in a parent-child relationship. From what I know, you cannot mimic the value generating sequence in the data table itself so you simply create a data table autoincrement with seed 0 and step -1 to avoid collisions.
The problem with what Im doing is that I have to deal with the parent-child relationship between the two tables. IE. In order to insert the child record, I need the parents key first--which is only generated upon insertion of the parent record to the data source.
If I maintain referential integrity at the dataset level, is the data adapter intelligent enough to map values accordingly such that the relations are still intact when pushed to the data source?
Oh yeah, Im working with various backends where I may not be able to retrieve the sequences next val (IE. SELECT SEQ_TABLENAME.NEXTVAL FROM DUAL in Oracle). That would have been best, but in this situation its not a viable approach.
I have two tables that implement value generating sequences for the ID fields (at the data source level, not the data table). The two tables are aligned in a parent-child relationship. From what I know, you cannot mimic the value generating sequence in the data table itself so you simply create a data table autoincrement with seed 0 and step -1 to avoid collisions.
The problem with what Im doing is that I have to deal with the parent-child relationship between the two tables. IE. In order to insert the child record, I need the parents key first--which is only generated upon insertion of the parent record to the data source.
If I maintain referential integrity at the dataset level, is the data adapter intelligent enough to map values accordingly such that the relations are still intact when pushed to the data source?
Oh yeah, Im working with various backends where I may not be able to retrieve the sequences next val (IE. SELECT SEQ_TABLENAME.NEXTVAL FROM DUAL in Oracle). That would have been best, but in this situation its not a viable approach.