Fwd: [Nitro] Not expected behavior

James Britt jamesUNDERBARb at neurogami.com
Sat Mar 19 09:12:57 EST 2005

George Moschovitis wrote:
> ---------- Forwarded message ----------
> From: George Moschovitis <george.moschovitis at gmail.com>
> Date: Sat, 19 Mar 2005 08:02:41 +0200
> Subject: Re: [Nitro] Not expected behavior
> To: james_b at neurogami.com
> Hello James,
> you are correct, Og only automatically finds manageable classes that
> are already defined. Alternatively you can call:
> og = OgDatabase.new(...)
> og.manage(MyClass)
> to explicitly manage classes.
> I 'll ad a new method like
> og.find_manageable_classes (or something like this, any idea for a better name?)
> Even better, if you have any other idea, how I could recode this to
> work as expected, please let me know!

I had started wondering if I was supposed to inherit or extend a class, 
which is one way to explicitly indicate a class should be enchanted or 

One the one hand, the idea that all classes magically acquire certain 
persistence methods is rather nice.  On the other, maybe this isn't what 
one wants (for example, you have other objects with a 'save' method and 
they behave differently).

Since one has to use 'property' or 'prop_*'  methods to indicate what 
fields are to be saved, could the call to Og.manage( class) be hooked 
into those?  Whenever Og sees that some class is calling a prop_* 
method, it marks the class for enchantment?



More information about the Nitro-general mailing list