Re: Virtual Private Database and List 2 pattern [message #4212 is a reply to message #4211] |
Wed, 04 June 2014 13:01 |
AJM
Messages: 2371 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I have created the two tables from the schema which you sent, created the transactions to maintain those tables and then created some test data.
I have created data on the htm_db_vereine (parent) table using username VPD1 and VPD2. Then I created entries on the htm_db_saisons table (child) also using username VPD1 and VPD2.
If I logon as VPD1 I can only see the entries for account #1.
If I logon as VPD2 I can see the entries for accounts #1 and #2.
I think the problem you are having is because you created a parent entry with account #1 and then added a child entry using account #2. Although the framework allowed this, it is technically invalid because the column rdcaccount_id on the parent table is part of the primary key, which means that all child entries MUST have the same value for rdcaccount_id.
The way that I got around this is to take rdcaccount_id out of the primary key for the parent table but leave it in the table.
If you read the documentation you will see that after adding the rdcaccount_id column to a table you may add it to the primary key or leave it as a non-key field. If it is part of the primary key then all child entries MUST have the same value for rdcaccount_id. If it is not part of the primary key then the child table can contain entries with different values for rdcaccount_id.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|