Page 1 of 1
Update Selected Records Has No Effect (in related list)?
Posted:
Tue Feb 23, 2010 4:02 am
by 00Davo
Using the Update Selected Records button - specifically while viewing a related records list - behaves the way it's supposed to. It lists the fields you can change, lets you change them, and all that stuff. But when you actually apply your changes, no modification is made to the database. The message at the top says that the records were successfully altered, but they
weren't changed at all.
The exact same fields can be updated normally in a regular listing. It's just related_record_list that has the issue.
Re: Update Selected Records Has No Effect (in related list)?
Posted:
Tue Feb 23, 2010 10:19 am
by shannah
What version of Xataface are you using? Were you trying to set the value to 'blank' or 0?
Re: Update Selected Records Has No Effect (in related list)?
Posted:
Tue Feb 23, 2010 12:57 pm
by 00Davo
/xataface/version.txt
- Code: Select all
1.2.3b1 1690
No, I wasn't trying to set the field to blank.
Possible thought: this is the related list for the Class-Student relationship. This relationship runs on a Class field in the Student table. This field is the one I wanted to change. Perhaps you can't make an update if it would break the relationship you're using to make the update or something?
Re: Update Selected Records Has No Effect (in related list)?
Posted:
Tue Apr 06, 2010 4:59 pm
by 00Davo
*bump* This is a fairly serious issue for my app, since it's definitely necessary to update relationships in this manner.
Re: Update Selected Records Has No Effect (in related list)?
Posted:
Thu Apr 08, 2010 10:32 am
by shannah
After looking into it, you're correct. There is a limitation that prevents changing a related record to be removed from the relationship.
The limitation is from within the Dataface_RelatedRecord::setValue() method. I don't want to change this behavior from within there, due to the ripple effect.
I'll have to think about whether it would be better to fix this by removing the option on the update form to update fields that help form the relationship -- or to try to add support for it.
-Steve
Re: Update Selected Records Has No Effect (in related list)?
Posted:
Thu Mar 01, 2012 6:15 am
by ADobkin
"Bumping" an old topic....
I've noticed this behavior recently also. I have a set of related records linked to an old location. I wanted to update all of them to point to the new location, which would have removed them from the relationship. Xataface appears to happily execute the request and says that the changes were successful, but no changes were actually made.
If there is still an issue with adding support for this scenario, I'd like to propose another "quick fix" option. It would be helpful if the result message indicates that the action failed and why. The workaround in my case was to go directly into the other table (not through the relationship) and change the same records there, which worked just fine.
Re: Update Selected Records Has No Effect (in related list)?
Posted:
Sat Mar 03, 2012 4:22 pm
by ADobkin
I noticed that if I edit individual records one at a time in the same relationship, Xataface does allow them to be removed from the relationship. So this issue with Dataface_RelatedRecord::setValue() appears to only affect the bulk updates, but not individual records in the same situation.