On Dec 4, 2013, at 2:18 AM, Hugi Thordarson <[email protected]> wrote:
> Hi all.
>
> I’ve been attempting to automate the setting of some common attributes in my
> EOs, like creationDate, createdByUser etc. etc. Usually one might populate
> attributes like that in awakeFromInsertion, but that's boilerplate I’d rather
> not add to my EO classes. So instead, I’ve taken a different route.
> Anyone have any happy litle ideas on how to tackle the problem?
Y u reinvent wonder? See ERXEntityClassDescription:
ERXDefaultValues = {
creationDate = “@now”;
createdByUser = “@threadStorage.actor”;
}
:-)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]