Re: one model, multiple database instances

[email protected] Wed, 01 Sep 2004 12:33:43 +1200
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
On Mon, 30 Aug 2004 22:55:37 +0200
Sebastien Bigaret <[email protected]> wrote:

> Ooops, two posts, only the last paragraphs that differ.
> The second one is the right one.  I removed the
> discussion of whether thsi is a YAGNI, just because I
> think that the consequences on the API and clarity of
> MDL statements are sufficient to discard the feature
> (unless it is proven that both approaches --more details
> or going the implict way) can be avoided.

Hello,

I'm back from the dead (sorta), unfortunately haven't had time to try
Sebastien's solution ( append login name to entities and modelname );
Tricky part is writing your biz ligic once:

class A:

    __metaclass__ = dynamic.CustomObjectMeta
    entityName = 'A'
    mdl_define_properties = 1

    def custom_method( self ):
	pass

and then have class A_login1, A_login2 generated on the fly,
playing with the entityName attribute, I'll give this a try later.

thanks for your feedback
--
Delio


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click