Open darthtrevino opened 10 years ago
Correct me if I'm wrong but doesn't persistencejs generally expect unique ids across all tables? We specifically set the ids to composite values like 'tablename:tableuniqueid' to ensure a one-to-one mapping to a DB with regular constraints (unique ids within tables only).
It's been a couple of years since I looked at it, but IIRC, the constraint was stronger that 'unique in the table', it was 'unique in the entire dataset'.
It looks like the loadFromJson feature expects data rows to have unique IDs across all of the tables in the database. If there is an ID collision, then the earliest usage wins and later rows are simply not entered.
You can work around this, but it makes maintaining JSON data dumps a bit of a pain.