Psycho Punch
Psycho Punch

Reputation: 6892

Grails - include id property when calling .properties

I'm trying to get all properties of domain objects as a Map, and found out that Grails provides built-in access to that through the properties field. However, I noticed that it ignores id property. Is there a way to force it to return id just like any other object properties?

Upvotes: 1

Views: 201

Answers (1)

saw303
saw303

Reputation: 9072

AFAIK there is no way to achieve this by using the Groovy JDK method Object#getProperties.

Upvotes: 2

Related Questions