Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
database rows getting over-written
rashy
In my data deploy script, I have 2 groups mapping to the same table.
And the values of the items in both the groups are different.
But while doing a deployment, the values from the last group over writes all other values and in effect only one row gets inserted into the DB.
Attaching the test deployment script along.
So in this case, isnt there a way so that 2 rows get updated inside the database.
The primary key column is assigned the same for both the groups, but the values inside are different. So wanted to understand why does it over write rather than add a new row?
And one more question- Primary-key tag is compulsory for all the groups?
Can we omit this inside any group definition.
Find more posts tagged with
Comments
Migrateduser
I am actually surprised its not throwing other errors.. your root-group and any other group can't use the same table that way (even with a different name).. its ambiguous
the way you would do it is to create an [updateable] VIEW that is just same as the root-group table..
the make your DD groups like:
[html]
[/html]dont forget to set table-view="yes" in your database.xml or it wont see the views (and restart OD to make sure nothing is cached)