[sqlalchemy] Re: Elixir 0.6.1 released!

2008-08-19 Thread Jorge Vargas
On Mon, Aug 18, 2008 at 11:37 PM, Jose Galvez [EMAIL PROTECTED] wrote: I'm not trying to be an ass, but what are the advantages to using Elixer well you did sound like one :) the first thing is that declarative is very new to SA (0.4.something, and only mainstream in 0.5), while elixir has

[sqlalchemy] Re: Multiple Foreign Keys

2008-08-19 Thread Ally
Yep, that was exactly what I needed! I've just ordered the book so hopefully I won't end up struggling on the little things like this again! Thanks for your help, much appreciated! Ally On Aug 18, 11:30 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Aug 18, 12:30 pm, Ally [EMAIL PROTECTED]

[sqlalchemy] Re: Self-referential mapping with Root ids/access

2008-08-19 Thread Michael Bayer
On Aug 18, 2008, at 8:41 PM, Tom wrote: I am trying to build a self-referential mapper like the basic_tree example, but would like to be able to access the root of any given TreeNode, much like the now depreciated and tricky byroot_tree.py. Before you tell me just to use the byroot_tree,

[sqlalchemy] DateTime Column as Python time tuple.

2008-08-19 Thread Heston James - Cold Beans
Hello Guys, I'm looking to send an object from SQLAlchemy across a ZSI web service as a complex type. To do this ZSI requires that datetime's in the objects be in Python Time Tuples as documented in the 'time' module. It looks as if by default SQLAlchemy uses datetime.datetime objects for

[sqlalchemy] Re: Elixir 0.6.1 released!

2008-08-19 Thread Jose Galvez
Thanks for the info, I guess I didn't realize declarative was added so recently, its been a while since I actually looked at the SA docs (which is where I found it). But you do make some good points about Elixer, I'll have to give it another look, because I do find the way that SA defines

[sqlalchemy] Creating Oracle Triggers on Table Create

2008-08-19 Thread Gerrat
We have an oracle database, and all of our tables have auto-generating id's on the primary key via a trigger that looks like : - CREATE OR REPLACE TRIGGER SCHEMA.some_table_rid BEFORE INSERT OR UPDATE OF rid ON some_table FOR EACH ROW BEGIN IF UPDATING THEN :new.rid :=

[sqlalchemy] Re: Creating Oracle Triggers on Table Create

2008-08-19 Thread Michael Bayer
On Aug 19, 2008, at 1:59 PM, Gerrat wrote: Is there a way to easily hook into the table creation mechanism so that whenever a Sequence was specified as part of a Column definition, a similiar trigger could be inserted (substituting some names obviously)? I know I can manually issue the

[sqlalchemy] Re: Creating Oracle Triggers on Table Create

2008-08-19 Thread Gerrat
On Aug 19, 2:11 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Aug 19, 2008, at 1:59 PM, Gerrat wrote: Is there a way to easily hook into the table creation mechanism so that whenever a Sequence was specified as part of a Column definition, a similiar trigger could be inserted

[sqlalchemy] declarative

2008-08-19 Thread Jose Galvez
What is the proposed stability of declarative functions which I guess are pretty new. From what I've read so far I really like it and was thinking of using it, but was just wondering what the long turn outlook for it looked like? After doing some reading on the new release of Elixir, Elixir

[sqlalchemy] Re: declarative

2008-08-19 Thread Jose Galvez
I take it back about Elixir and legacy databases, it seems to work with them just as easy as sqlalchemy does. I'll have to look much closer at Elixir Jose Jose Galvez wrote: What is the proposed stability of declarative functions which I guess are pretty new. From what I've read so far I

[sqlalchemy] Re: declarative

2008-08-19 Thread Michael Bayer
On Aug 19, 2008, at 2:43 PM, Jose Galvez wrote: What is the proposed stability of declarative functions which I guess are pretty new. From what I've read so far I really like it and was thinking of using it, but was just wondering what the long turn outlook for it looked like? After

[sqlalchemy] error while accessing row in create_instance

2008-08-19 Thread naktinis
In MapperExtension's method create_instance(self, mapper, selectcontext, row, class_) I try to call row.has_key('some_key') but I get: AttributeError: 'str' object has no attribute 'proxy_set' This is in version 0.4.6. It worked fine in 0.4.2p3. What could be the problem?

[sqlalchemy] Re: Creating Oracle Triggers on Table Create

2008-08-19 Thread Michael Bayer
On Aug 19, 2008, at 5:08 PM, Gerrat wrote: This doesn't quite work: the DDL class (well, the method '_TextClause' in the module 'expression' actually) parses out any sql containing a ':' (colon) as if it were a bind variable. Althouth the documentation says: SQL bind parameters are not