ox-it / ords

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

Cannot add new record if foreign key field name contains spaces #771

Open MerielP opened 8 years ago

MerielP commented 8 years ago

I created a database (imaginatively called 'Newly created database', in the project 'Staging test', on Staging) which has two tables. These are joined by a single relationship, and the foreign key field has a space in it:

database schema - space in foreign key field name

This seems to work perfectly fine until one tries to add a new record to the table containing the foreign key field, at which point error messages start to appear, and no new record can be added:

error message - adding new record with spaces in foreign key field name - staging

The point at which the error message appears varies slightly. First of all, I was able to open the 'Add new record' form, but trying to view the contents of a different field in a linked field caused a crash. After that, I started getting the message whenever I clicked the 'Add new record' button - I couldn't even get to the form.

Removing the space from the field name makes everything work as it ought to.

This problem isn't confined to Staging, as something similar happened when I tried this on App. Again, there's some slight variation in when the error message appears, and the message itself was different, but the general point - that one cannot add a new record if the foreign key field name has a space in it - remained the same. Once again, removing the space fixed the problem. The error message I got on App was:

error message - adding new record with spaces in foreign key field name - app

Although this problem exists on App as well as Staging, I wonder if it's somehow related to issue #769, as the fact that spaces in field names are involved in both cases seems suggestive.

thestoat commented 8 years ago

Ok, there are now no exceptions when this happens. But still a problem since in this situation you cannot add a new record.