Iterate on properties - Feature Removed?

Continuing the discussion from Platform Update - Release Notes– 06/23/2015:

Was the ability to iterate on properties removed in this platform update (or a recent platform update)?

9:07:58 PM: error java.lang.SecurityException: Invoking methods on class org.codehaus.groovy.grails.web.binding.DataBindingLazyMetaPropertyMap is not allowed: each @ line 417

Sample Code:
(where subscription is the result of a subscribe() call or grabbing a subscription from app.subscriptions)

subscription.device.properties.each { prop, val ->
        log.debug "property: ${prop}; val: ${val}"
}
2 Likes

iterating on properties works fine.

using

is where you end up with a

which is the thing you can’t call a method on, or the thing with the behaviour change per your other post.

Perhaps subscription.values().device.properties.each would work? or
subscription.get(“device”).properties.each?

1 Like

Good catch. It does seem to be related to the subscription issue. If I get a proper device object, the code works.

1 Like