[Pharo-project] Fwd: [Pharocasts] New comment on SandstoneDb, simple ActiveRecord style persistence....

Cédrick Béler cdrick65 at gmail.com
Wed May 4 09:31:36 EDT 2011


maybe the initialization can be done in the inspector by iterating over all instances that have some instances set to nil...

(MyObject allInstances select: [:ea | ea createdOn isNil]) do: [:ea | ea initInstVarsFromSDFramework]

where initInstVarsFromSDFramework
would be somethin like super initialize + maybe some tweaks on createdOn...

SDActiveRecord>> initialize
	super initialize.
	id := UUID new asString36.
	createdOn := updatedOn := DateAndTime now.
	version := 0.
	isNew := true

hth,

Cédrick









More information about the Pharo-dev mailing list