cgoIT opened a new issue, #14452: URL: https://github.com/apache/grails-core/issues/14452
### Steps to Reproduce I've created a simple demo app which shows my problem. I tried to use a derived field in one of my domain classes using formula in mapping closure. I want to use a subselect to a view. I cannot use some kind of _size()_ method oder something like this in my real app for some special reasons. I thought I don't have to use transients for this field. But if I omit this, gorm creates a column in my table for property _projectCount_. ### Expected Behaviour I just want grails/gorm to use my sql statement under formula to be executed if i read the property _projectCount_ of my domain class _Person_. ### Actual Behaviour The sql statement is never executed and the value of the property _projectCount_ is always 0. ### Environment Information Operating System: Mac OSX 10.14.5 GORM Version: 6.1.11.RELEASE Grails Version (if using Grails): 3.3.10 JDK Version: OpenJDK 64-Bit Server VM (Zulu 8.38.0.13-CA-macosx) (build 25.212-b04, mixed mode) ### Example Application An small example project could be found at [https://github.com/cgoIT/grails-formula-bug](https://github.com/cgoIT/grails-formula-bug) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
