Sunday, February 22, 2015

Re: Still having trouble with saving BelongsToMany data

Also, just to clarify, i'm not adding new Attributes in the Listing form. i'm displaying them, and when the user checks them, a text input is shown for those that require it. The only data i need to save apart from the Listing is in ListingsAttributes:
attribute_id : 1 (Attribute's checkbox value),
listing_id   : 1 (new id generated by Listings save),
value        :
'Off-street' (string from the checked Attribute's text input)

But it sounds like you're hitting the same issue i am: the Listing record saves, but nothing is fed to ListingsAttributes despite the established associations.

Thanks for at least investigating it further. i just wish i knew what to do about it.
-joe


On Sunday, 22 February 2015 17:39:52 UTC-5, heavyKevy wrote:
I took the time to construct a test project with the 3 join tables and was able to get data that looks like the documentation requires, but it refuses to save.
The joint marshaller chokes because no listing_id, and no attribute_id is found when marshalling the _joinData.

I don't see in the documentation what else needs to be included to ensure that the attributes are saved.

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: