Re: [Pharo-users] SandstoneDB, Fuel - Contexts must only be created with newForMethod:
Re: SandstoneDB, Fuel - Contexts must only be created with newForMethod:
In reply to this post by Paul DeBruicker On 09/09/2011 10:36 AM, Paul DeBruicker wrote:
#sandstoneDeepCopyVisits: is calling basicNew: on the class MethodContext.
Because SandstoneDb isn't meant to save special objects like classes, blocks, or method context's, it's meant to save plain old Smalltalk data objects from your domain the same way you'd use a relational database. It's a simple active record data store for quick prototyping based on serialized files, not a full blown object database that can save every possible object type.
I've attached the PharoDebug.log. It seems to be choking when trying to save an instance of a RangeConstraint class from the Chronos package. The RangeConstraint class stores two different blocks in two different i-vars. The RangeConstrait is there because I'm saving instances of the Timepoint class from the Chronos package. Seems like I should just use the onBeforeSave and onAfterSave to switch between Timepoint instances to DateAndTime for storing the dates and times. Plus the timeZones. Or is there another strategy you'd recommend? Thanks Paul
On 09/09/2011 11:13 AM, Paul DeBruicker wrote:
Seems like I should just use the onBeforeSave and onAfterSave to switch between Timepoint instances to DateAndTime for storing the dates and times. Plus the timeZones.
Or is there another strategy you'd recommend?
Thanks
That sounds reasonable actually, sort of a manual serialization prep down to raw data. However, you'd need an onLoad as well for a fresh image start from disk. I just realized I don't have a load event; I'll add one. -- Ramon Leon http://onsmalltalk.com
participants (2)
-
Paul DeBruicker -
Ramon Leon