How do you set up dynamic property defaults on CF9 ORM objects?
For instance, I know I can set a property default like this:
property name="isActive" default="1";
But what if you want to have a dynamically generated default, such as a date or a UUID?
property name="uuid" default="#createUUID()#";
…throws an error – so what’s the workaround for this?
When an Entity object is created the objects constructor is called. This is a great place for running “setup” code.
User.cfc