I’m using the ORMService within a Service and instead of populating a model with RC vars I need to populate with arguments.
I’ve tried this, but it doesn’t seem to work.
Am I doing this incorrectly?
The function is just populate in the ORMService.
public any populate(any target, struct memento, [string scope=’’], [boolean trustedSetter=‘false’], [string include=’’], [string exclude=’’], [boolean ignoreEmpty=‘false’])
Simple map to property population for entities
scope - Use scope injection instead of setter injection, no need of setters, just tell us what scope to inject to
trustedSetter - Do not check if the setter exists, just call it, great for usage with onMissingMethod() and virtual properties
include - A list of keys to include in the population ONLY
exclude - A list of keys to exclude from the population
I think I was mixing up populateModel() which I use in handlers and populate which is part of ORMService. Thanks Curt.
where does populateModel exist in the framework if it’s not part of the ORMService?
It’s part of the Framework Supertype and can be used for populating any object, not just ORM objects.