Re: [sqlalchemy] Re: negative implications of using multiple declarative Base classes
avdd wrote: I'm glad you brought this up. It seems to me that the the declarative instrumentation keys classes by their unqualified class name, precluding using the same class name for different declarative subclasses (ie, in different modules). Indeed, but I suspect there's more to it than that. My guess would be that you'd then have to use the full dotted name to the class, which might be problematic. Myself, I wish we could drop the need for the registry in the declarative base and push all the required info down into the MetaData object. What would be the problems with doing this? Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
Re: [sqlalchemy] Re: negative implications of using multiple declarative Base classes
On Aug 24, 2010, at 3:04 AM, Chris Withers wrote: avdd wrote: I'm glad you brought this up. It seems to me that the the declarative instrumentation keys classes by their unqualified class name, precluding using the same class name for different declarative subclasses (ie, in different modules). Indeed, but I suspect there's more to it than that. My guess would be that you'd then have to use the full dotted name to the class, which might be problematic. Myself, I wish we could drop the need for the registry in the declarative base and push all the required info down into the MetaData object. What would be the problems with doing this? breaks encapsulation. Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
[sqlalchemy] Re: negative implications of using multiple declarative Base classes
I'm glad you brought this up. It seems to me that the the declarative instrumentation keys classes by their unqualified class name, precluding using the same class name for different declarative subclasses (ie, in different modules). On Jul 9, 12:01 pm, Randy Syring ra...@rcs-comp.com wrote: I have been, naively it seems, using multiple declarative Base classes in my webapp. They all share the same metadata object. I have found one negative ramification of this, which is that string references (like what can be used in relation()) won't find the object if they are not using the same Base. Are there others? -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.