SerializeJSON() and ORM watch out!
I'm not sure if this is a bug or the way ColdFusion 9.0.1 works, but today I had an issue with the way ColdFusion was serialising an ORM Entity.
I was making a simply AJAX call and in CF using serialiseJSON() method on an ORM object. My issue was that any object that had a property that was an array of other objects was not being returned. I posted the issue on stackoverflow but then I remembered having the same issue in a Google Group Post on Taffy. I remember resolving this at the time by splitting up the object and basically recreating it again. I was about to do the same thing then on the Adobe livedocs and spotted "remotingFetch"Quote: "If remotingFetch is false, then the value of that attribute is not sent over flash remoting. The attribute is true by default for all properties. However, for ORM CFCs where persistent = true, the value of the remotingFetch attribute is set to false, by default, for one-to-one, one-to-many, many-to-one, or many-to-many relationships. After enabling this on my relationship it fixed the issue! However as this was referred to under "flash remoting." I missed it the first time around."
After enabling this on my relationship it fixed the issue! As this was referred to under "flash remoting." I missed it the first time around. Just something to watch out for.
Sep27



There are no comments for this entry.
[Add Comment] [Subscribe to Comments]