[sqlalchemy] Re: Announcing Elixir!
On 2/15/07, Jonathan Ellis [EMAIL PROTECTED] wrote: For instance, I remember reading somewhere that AM wasn't very good at playing well with the rest of SA when AM wasn't enough, so I never bothered looking at AM very hard. I don't see anything on the elixir site about this issue, but maybe I am looking in the wrong place. That would be my FUD. I only had it happen in a particular 0.2 release (forget which). Everybody else who has used the two together seems to have never had a problem and I know I haven't had any problems mixing the TurboGears identity (AM) with non-AM classes in SA 0.3. I doubt it'd be listed in the Elixir docs because it hasn't been a widespread problem. I'm just noisy. P.S. I hear if you mix Elixir and SQLSoup you get magic DSL jellybeans. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: Assign mapper many-to-many with extra columns
On 2/3/07, iain duncan [EMAIL PROTECTED] wrote: InvalidRequestError: Given column 'page_article.ordering', attached to table 'page_article', failed to locate a corresponding column from table 'article_36c9' I'd think that you're missing the .c. in the middle: page_article.c.ordering --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: Persistence Layer best practices with SQLAlchemy
On 1/27/07, Allen Bierbaum [EMAIL PROTECTED] wrote: I agree that a complete separation is probably either a) impossible or b) going to lead to code that is so complex and difficult to maintain that it removes any advantage gained. I modify the schema and code in step during development, once the project is finished and enters into maintanence, the object model stays pretty much fixed. From your initial message, I'm sure whether you wanted to use raw SQL or SA's interface. The latter isolates changes much better than the former, so the rest assumes that's what you're using. Table name changes are pretty simple, change the first argument to Table and all the ForeignKeys that reference it. Field name changes are less obvious. I make use of the key= argument of the Column class because that means my queries don't need to be rewritten. Flexibility beyond that is dependent on how many queries you have scattered around your code. For code that's just using the final mapped objects, you can map pretty much anything you can query onto a particular attribute. I've done a few mapping changes where a field is normalized or de-normalized and the object stays the same. The code using the objects doesn't have to change, but the queries that touch that field generally do. Certain changes are simpler than others, your mileage may vary. I am starting to think that it still has all the power and flexibility of the other methods of using SA but simple encapsulates the Table and Mapper creation in a single unit. Can anyone tell me if this is a correct assessment? ActiveMapper implements the active record pattern while the standard SA ORM interface implements the data mapper pattern (see Fowler's Patterns of Enterprise Architecture for explanations). For basic usage, ActiveMapper is more convenient and is basically a thin wrapper over the standard. The problem is that it's relations are less powerful -- there's no primaryjoin or secondaryjoin, this is an implementation limit and can be fixed -- and quite a few of the features listed in the Advanced Datamapping section of the docs are unavailable to you. You cannot, for example, map multiple tables onto a single object, this is a design limit. You can mix and match ActiveMapper and normal SA mapped objects and definitions, but I prefer to just use active_mapper exclusively. The biggest disadvantage is that the code is spread into three locations. I work around this using code folds in Vim, but it's still a bit clunky. There is another active record mapper called TurboEntity (no ties to TurboGears despite the name), which a number of people on the TG mailing list like. The authors of ActiveMapper and TurboEntity are collaborating on a joint project to replace both with a mapper that implements a DSL which, to me, looks like a mix between Rails' ActiveRecord and Smalltalk. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: class-object-like attribute lookup
On 1/25/07, Christopher Arndt [EMAIL PROTECTED] wrote: It doesn't need to be recursive, just a two-level parent-child relation. And I don't want to add any columns, so I was thinking that table inheritance is not the right approach, but I'm not sure about that. I was thinking that you could check parent_id for null or not null and map that way, but it doesn't look like the polymorphic mapper can handle that. Ah well. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: SQLAlchemy at pycon 07
On 11/29/06, Jonathan Ellis [EMAIL PROTECTED] wrote: My proposal for a talk on SqlSoup was accepted. It looks like someone else's talk on SA itself was accepted too. Woot! :) I'm not seeing a list of accepted talks on us.pycon.org; any links? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: GUI + SQLAlchemy?
On 11/14/06, Basil Shubin [EMAIL PROTECTED] wrote: Is there standalone GUI application that using SQLAlchemy? Of course it should be open source apps. There is neither an open source nor a commercial GUI interface for SQLAlchemy. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---
[sqlalchemy] Re: [Sqlalchemy-users] Typed Relations - Any Easier way to do Association Object?
On 11/1/06, Michael Bayer [EMAIL PROTECTED] wrote: (moving to google groups) Eh, sorry cached email address. the idea of using an instrumented list subclass is that you *would* use the association object, and just have the list subclass handle the references to the association object for you, i.e.: Simple enough class MyList(list): def append(self, item): super(MyList, self).append(new ItemAssociation(item)) def __getitem__(self, index): return super(MyList, self).__getitem__(index).item ..etc I'm not understanding what's happening in the append. I know item is one side of my relation, but how to I get access to the other? Is the InstrumentedList magic supposed to handle this somehow? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy -~--~~~~--~~--~--~---