Issues with Constrained By for existing data after upgrades
4
I have a strange issue with forms using the Constrained By property to filter association selections. If I create a new entry in my form, the selection dropdowns on the associations display the correct data and all works as it should. But, if I open an existing record, the association fields are empty and there is nothing in the drop-down selector. Re-opening one of the newly created records displays the correct data, so this issue only affects old records that existed before the last couple of upgrades. I have tried investigating: If I remove the Contrained By property, the existing association data is displayed in the form (and the drop-down displays all the possible values, unconstrained). This indicates the association is actually populated even though it doesn't display if the contrained by property is set. If I replace the Constraied By property with an equivalent x-path constraint, the correct data is displayed for the existing association, and the selection list displays the correct list of entries. If I compare the data in the database for a newly created entry against an old entry, the data in the association tables looks correct. Clearly, I don't want to have to go through my model and try to replace all instances where I have used the Constrained By property. Has anyone seen this before, or have any suggestions as to what might cause this behavior? Here is an example of the Contrained By (which does not work for existing entries but does work for new ones) Here is the equivalent x-path constraint which works: Update: After further investigation, this is not an issue with existing data being corrupted by the upgrade. It looks to me like a bug in 4.3.0 with entities that are specializations of other entities, and displaying associations defined at different 'levels' in the specialization/generalization chain. In my situation, the Contact entity was a specialization of Account and User. My association Contact_Company is constrained and displays properly for Contact records. I have a second entity which is a specialization of Contact (called StaffMember). So staff member is a specialization of Contact/Account/User. If this Staff entity exists, the association from Contact_Company is constrained and displays properly in the Staff form, but if I open the entity in the Contact form (a Staff record is also a Contact record), the constrained by does not work and the data is not displayed. This worked properly in 4.2.2 and earlier versions, but not in 4.3.0. There is a support ticket filed for this.