cr0hn / golismero-legacy

THIS IS A LEGACY VERSION PRESERVED FOR BACKUP, DO NOT USE
http://golismero-project.com
15 stars 4 forks source link

Validate the Data links when storing to database #167

Closed MarioVilas closed 10 years ago

MarioVilas commented 11 years ago

There's at least one possible corner case in which the Data links may not be properly set. That means when storing an object in the DB we must make sure all links are reciprocal.

This could also mean we should move the Data links out of the objects themselves and into the database. That way we can let the database engine do part of the work.

MarioVilas commented 11 years ago

This ticket is probably going to be obsolete soon with the new data model.

MarioVilas commented 10 years ago

Related ticket: #197

MarioVilas commented 10 years ago

There is the problem of having to write Data object in batches, though. Otherwise you couldn't add two new objects linking to each other.

Also, it's no longer possible to have links that are not reciprocal, so the only issue would be orphaned links.

We could solve this with a simple SQL script, and run it for example when opening the database.