Grails - include id property when calling .properties

Psycho Punch

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?

saw303

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Include property but exclude one of that property's properties

Grails view hangs when calling a controller action

Include transient domain class properties as restful json or xml response in grails

Is it possible to include a variable when calling an object

@firebase/database: Can't determine Firebase Database URL. Be sure to include a Project ID when calling firebase.initializeApp(). Angular

Properties are null when calling a command method

Calling Rectangle.Inflate() when Rectangle is a property

Attempt to read property when calling a class

Invalid Chai property when calling calledOnce

EF - Load properties of child property with single .Include() possible?

Error when calling Java Smooks library from Grails

Does calling the property .id automatically convert _id to a string format?

How do I (include) a Php page by calling a div id?

How can I find the Id property or properties related to a navigational property?

Calling the set method of a property when changing elements within that property

How to use Grails bindData when using collections in entity fields and properties

Grails 3 Entity not saved when properties set in EntityClass

Error when accessing static properties when services include each other

Adding include directories to CMake when calling it from the command line

Is there ever a reason NOT to include the module name when calling a helper method in Rails?

SwiftUI - Error when calling UUID().uuidString id

Undefined when calling id in HTML 5 input

LINQ include nested properties when selecting anonymous type

Entity framework should include properties immediately when inserting

Is there a way to ignore some entity properties when calling EdmxWriter.WriteEdmx

Expand all properties when calling get-msoluser

Code crashing when calling function that formats an Objects properties into a String?

TypeError: Cannot read properties of undefined (reading 'total') when calling an API

KahaDb properties in Grails