Update Selected Records Has No Effect (in related list)?

A place for users and developers of the Xataface to discuss and receive support.

Update Selected Records Has No Effect (in related list)?

Postby 00Davo » Tue Feb 23, 2010 4:02 am

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. :(
00Davo
 
Posts: 55
Joined: Sat Jan 02, 2010 9:02 pm

Re: Update Selected Records Has No Effect (in related list)?

Postby shannah » Tue Feb 23, 2010 10:19 am

What version of Xataface are you using? Were you trying to set the value to 'blank' or 0?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Update Selected Records Has No Effect (in related list)?

Postby 00Davo » Tue Feb 23, 2010 12:57 pm

/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?
00Davo
 
Posts: 55
Joined: Sat Jan 02, 2010 9:02 pm

Re: Update Selected Records Has No Effect (in related list)?

Postby 00Davo » Tue Apr 06, 2010 4:59 pm

*bump* This is a fairly serious issue for my app, since it's definitely necessary to update relationships in this manner.
00Davo
 
Posts: 55
Joined: Sat Jan 02, 2010 9:02 pm

Re: Update Selected Records Has No Effect (in related list)?

Postby shannah » Thu Apr 08, 2010 10:32 am

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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Update Selected Records Has No Effect (in related list)?

Postby ADobkin » Thu Mar 01, 2012 6:15 am

"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.
ADobkin
 
Posts: 195
Joined: Mon Oct 22, 2007 7:31 pm
Location: Atlanta, GA, USA

Re: Update Selected Records Has No Effect (in related list)?

Postby ADobkin » Sat Mar 03, 2012 4:22 pm

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.
ADobkin
 
Posts: 195
Joined: Mon Oct 22, 2007 7:31 pm
Location: Atlanta, GA, USA


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 10 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved