ox-it / ords

Automatically exported from code.google.com/p/ords
0 stars 0 forks source link

Adding new record to table with self-referential relationships caused crash #792

Open MerielP opened 8 years ago

MerielP commented 8 years ago

As an experiment, I just created an ORDS table with two self-referential relationships. The table was designed to hold a list of policies, with fields for 'preceded by' and 'followed by' - so one could add records for Policy 1, Policy 2, and Policy 3, and then indicate that (for example) Policy 2 was preceded by Policy 1, and followed by Policy 3.

Things seemed to be going fine to start with: I added two records, and indicated that one of them was preceded by the other. The problem arose when I added a third, and went to complete the 'followed by' field. I used the drop-down list in the 'Add new record' form to select the field I wanted to see. This had worked fine when I did it with the 'preceded by' table, but when I did this with the second field, the system crashed:

new-record-error-self-referential

Worse than this, I now can't access the new record form at all for this table; I get the crash report every time.

(I'm assigning this critical priority for now, as I think it needs to be at least looked at. It's possible it will get downgraded later, depending on how serious it proves to be, and how much work it would take to fix it.)

thestoat commented 8 years ago

This might bounce between us a little. I tried to follow your instructions and was able to add a record with a "followed by" field so I think more information is needed to asses how to go about fixing this. But for the moment I have added some code defence so that the crash will no longer happen. Let me know what you need doing next