[sqlalchemy] Re: SQLAlchemy 1.0.0 Released

2015-04-16 Thread Alexandre Conrad
Congratulations Mike! I must say that I am impressed (and always have been) by the amount of dedication you have put into SQLAlchemy over the years and everything you built around it, documentation, community, ... I can't think of any other open source project that has such a high degree of

[sqlalchemy] Re: SQLAlchemy 0.8.0 Released

2013-03-11 Thread Alexandre Conrad
Hey Mike, Thanks the fantastic work you have been offering to the open source community over the years ! I am personally very grateful and I am sure a lot of people think the same. Maybe should you jump directly to version SQLA 1.1 as people think 1.0 versions are still immature and they would

[sqlalchemy] Re: SQLAlchemy 0.8.0b1 released

2012-10-31 Thread Alexandre Conrad
Congrats Mike for all this great work! 2012/10/30 Michael Bayer mike...@zzzcomputing.com The first beta release of the SQLAlchemy 0.8 series, 0.8.0b1, is released for developer evaluation. 0.8 represents the latest series of refinements to the SQLAlchemy Core and ORM libraries and features

[sqlalchemy] WITH (nolock) on all queries

2011-06-28 Thread Alexandre Conrad
Hi list, So I am working on a project with SQLAlchemy using MSSQL as a back-end DB and I need to add a WITH (nolock) statement to all my queries implicitly. Even for the .get(pk_id) method. Mike actually pointed me to the .with_hint() method on the Query object but I couldn't get it to work. PS:

Re: [sqlalchemy] WITH (nolock) on all queries

2011-06-28 Thread Alexandre Conrad
, at 12:55 PM, Alexandre Conrad wrote: Hi list, So I am working on a project with SQLAlchemy using MSSQL as a back-end DB and I need to add a WITH (nolock) statement to all my queries implicitly. Even for the .get(pk_id) method. Mike actually pointed me to the .with_hint() method on the Query

Re: [sqlalchemy] How can I change manually the value of field with onupdate option ? I would like override onupdate mechanism

2010-10-28 Thread Alexandre Conrad
Not sure on this one, but are you passing a formatted date string? Maybe you should set a datetime object directly and let SA do the string conversion during flush. Alex Sent from my fantastic HTC Hero On Oct 28, 2010 1:41 AM, KLEIN Stéphane klein.steph...@gmail.com wrote: Hi, in my project,

Re: [sqlalchemy] SQLAlchemy 0.6.5 Released

2010-10-24 Thread Alexandre Conrad
This is amazing work! Thanks Mike. I am truly flabbergasted (heh, I always wanted to use that word somehow). How many tests are there? 2010/10/24 Michael Bayer mike...@zzzcomputing.com: Greetings - SQLAlchemy 0.6.5 is released.     As we approach towards the start of 0.7, where a good

Re: [sqlalchemy] Re: self referencing column

2010-08-26 Thread Alexandre Conrad
This is the documentation for self referential mapper: http://www.sqlalchemy.org/docs/mappers.html#adjacency-list-relationships I guess you have found the recipes for doing it the declarative way. 2010/8/26 waugust waugustyn...@gmail.com: I'm guessing that the answer would be as at:

Re: [sqlalchemy] Re: session get last row id?

2010-07-24 Thread Alexandre Conrad
flush is not commit. After a flush, you can still rollback. 2010/7/24 manman ne.man...@gmail.com if use flush() then how to rollback ? -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

Re: [sqlalchemy] sqlalchemy 0.5.8 or 0.6.0?

2010-05-30 Thread Alexandre Conrad
2010/5/30 Krishnakant Mane krm...@gmail.com: So I asume that 0.6.0 is pritty stable. Is all the documentation upto date? SQLAlchemy 0.6's documentation is up-to-date and probably is one of the best documentation in the Python eco-system. -- Alex twitter.com/alexconrad -- You received this

Re: [sqlalchemy] deleting

2010-04-14 Thread Alexandre Conrad
2010/4/14 Sebastian Elsner sebast...@risefx.com: I am unsure on how to delete correctly. Lets say I have a query's result, which is a list. del list[5] does not seem to do anything, right? I would always have to do session.delete(list[5])? Correct. del list[5] only delete the instance in

Re: [sqlalchemy] adding/deleting list of objects -- feature request/proposal

2010-02-26 Thread Alexandre Conrad
How about just a: cities = session.query(City).all() for city in cities: session.delete(city) or for city in session.query(City): #actually fires the query session.delete(city) or even (never tried that, read from the docs): session.query(City).delete() Alex 2010/2/26 Marcin Krol

Re: [sqlalchemy] eagerload

2010-02-26 Thread Alexandre Conrad
2010/2/26 Marcin Krol mrk...@gmail.com: mapper(City, city_table, properties={'users':relation(User, order_by='user_.id', backref='city_backref')}) Isn't it order_by='user.id' ? -- Alex twitter.com/alexconrad -- You received this message because you are subscribed to the Google Groups

Re: [sqlalchemy] adding/deleting list of objects -- feature request/proposal

2010-02-26 Thread Alexandre Conrad
2010/2/26 Marcin Krol mrk...@gmail.com: Sure, it can be done and I'm doing that: I'm just saying that it wouldn't hurt if you could pass a list to session.add or session.delete instead of handing objects over one by one. For adding, there's the .add_all(instances) method available. There's no

Re: [sqlalchemy] easy_install SQLAlchemy

2009-12-02 Thread Alexandre Conrad
Hello, Problem figured out: I opened an issue on Distribute (the setuptools fork): http://bitbucket.org/tarek/distribute/issue/99/easy_install-uses-setupcfg-if-in-working Regards, Alex 2009/12/2 Alexandre Conrad alexandre.con...@gmail.com: Ok, I have my finger on the problem. From

[sqlalchemy] easy_install SQLAlchemy

2009-12-01 Thread Alexandre Conrad
Hey there, just wondering: easy_install SQLAlchemy downloads and installs version 0.5.2. Shouldn't it be 0.5.6? Regards, Alex -- 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.

Re: [sqlalchemy] easy_install SQLAlchemy

2009-12-01 Thread Alexandre Conrad
+0100, Alexandre Conrad pisze: Hey there, just wondering:     easy_install SQLAlchemy downloads and installs version 0.5.2. Shouldn't it be 0.5.6? # easy_install SQLAlchemy Searching for SQLAlchemy Reading http://pypi.python.org/simple/SQLAlchemy/ Reading http

Re: [sqlalchemy] Re: SQLAlchemy 0.5.5 MySQL Issue

2009-11-28 Thread Alexandre Conrad
, Alexandre Conrad alexandre.con...@gmail.com wrote: 2009/11/27 gizli mehm...@gmail.com: With mysql however, the insert done by the query() actually does a commit.. i turned on ec... -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To... -- You

Re: [sqlalchemy] SQLAlchemy 0.5.5 MySQL Issue

2009-11-26 Thread Alexandre Conrad
2009/11/27 gizli mehm...@gmail.com: With mysql however, the insert done by the query() actually does a commit.. i turned on echo, and i dont see an explicit commit but this is what seems to happen.. After the program is done, I can see Obj(5) in the mysql database. Is this a known problem?

[sqlalchemy] Re: session.query object instead rowtuple

2009-09-28 Thread Alexandre Conrad
2009/9/28 Christian Démolis christiandemo...@gmail.com: I need it to avoid  write this in my code for e in s:    print e[0] it's more difficult to read than From a readability point of view, you could use unpacking in your loop: for foo, bar in ((foo1, bar1), (foo2, bar2)): ... print

[sqlalchemy] Re: SQL ALCHEMY instantly refresh

2009-09-18 Thread Alexandre Conrad
change the code of sqlalchemy itself, please help me. 2009/9/17 Michael Bayer mike...@zzzcomputing.com Alexandre Conrad wrote: Christian, 2009/9/17 Christian Démolis christiandemo...@gmail.com: Bonjour, Tu es français je pense au vu de ton prénom. Je continue donc en français

[sqlalchemy] Re: SQL ALCHEMY instantly refresh

2009-09-17 Thread Alexandre Conrad
2009/9/17 Christian Démolis christiandemo...@gmail.com: How can i force sqlalchemy to refresh an object when i did a session.query??? You may want look at this: http://www.sqlalchemy.org/docs/05/session.html#refreshing-expiring You may, as well, look at expunging. Alex

[sqlalchemy] Re: Dynamic loader versus lazy=True

2009-09-15 Thread Alexandre Conrad
Keep in mind that the method on your Bar class: def all_foo(self): foo_query.all() will return a raw *list* of Foo objects. If you append more Foo objects to it, they won't be seen by SQLAlchemy's session, thus not being commited. Although, if you have set on your mapper:

[sqlalchemy] Re: Dynamic loader versus lazy=True

2009-09-15 Thread Alexandre Conrad
2009/9/10 Wolodja Wentland wentl...@cl.uni-heidelberg.de: Class Bar(object):    def all_foo(self):        foo_query.all()    def foo_startwith(self, search_string):        foo.query.filter(tbl.c.col.like('%s%%'% ...)) Note that a .startswith() method is already implemented in SA:

[sqlalchemy] Re: Q: fetch value of autoincrement column

2009-05-24 Thread Alexandre Conrad
Hello Adrian, In my case, I actually build up my SA model, flush it, and save the file on disk using the id that's been populated on my object after flush. Sorry, your original question didn't really give enough details on what you wanted to do. What you were trying to achieve is not common

[sqlalchemy] Re: Q: fetch value of autoincrement column

2009-05-22 Thread Alexandre Conrad
Don't you want that non-null column to be a foreign key ? 2009/5/21 Adrian von Bidder avbid...@fortytwo.ch: Hi, Is it possible to fetch the values of an autoincrement field without flushing the object to the DB? (In postgres, I obviously can manually fetch nextval of the automatically

[sqlalchemy] Re: Q: fetch value of autoincrement column

2009-05-22 Thread Alexandre Conrad
Hello Adrian, 2009/5/22 Adrian von Bidder avbid...@fortytwo.ch: On Friday 22 May 2009 08.43:09 Alexandre Conrad wrote: Don't you want that non-null column to be a foreign key ? Would that make a difference? That's what a foreign key is used for: http://en.wikipedia.org/wiki/Foreign_key I

[sqlalchemy] Re: Q: fetch value of autoincrement column

2009-05-22 Thread Alexandre Conrad
Could you please send your SQLAlchemy tables you are working with to have a better idea of what's you want to achieve ? 2009/5/22 Adrian von Bidder avbid...@fortytwo.ch: On Friday 22 May 2009 13.58:34 Alexandre Conrad wrote: Hello Adrian, 2009/5/22 Adrian von Bidder avbid...@fortytwo.ch

[sqlalchemy] Re: SQLAlchemy 0.5.4 Released

2009-05-18 Thread Alexandre Conrad
Mike, Woooh ! it all sounds sounds great ! I was thinking that it would be nice to have an up-to-date version of your post you did a while back: http://techspot.zzzeek.org/?p=17 I know such a task takes time but it would be fun to see the results. That would keep SA's marketing in shape (even

[sqlalchemy] Re: How to write a self 2 self relationship?

2009-02-16 Thread Alexandre Conrad
So, does sqlalchemy support self 2 self relationship ? If the answer is YES, how to do it? You may want to look at the remote_side keyword argument. http://www.sqlalchemy.org/docs/05/mappers.html#adjacency-list-relationships Regards, Alex

[sqlalchemy] Re: How to write a self 2 self relationship?

2009-02-16 Thread Alexandre Conrad
As I said in my previous mail, you really should look at the remote_side keyword argument in your relation. This is what it was done for and the paragraph adjacency-list-relationships from the documentation covers all you need to know to deal with self-referential relationships. Here's the link

[sqlalchemy] Re: Joining a table to itself.

2008-02-12 Thread Alexandre Conrad
#advdatamapping_relation_selfreferential Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: can't setup simple one to many relation

2008-01-29 Thread Alexandre Conrad
you on track. Regards, -- Alexandre CONRAD Max Ischenko wrote: Hello, I'm struggling with a simple one to many relation, pls help! active_meetup = MeetupEvent(...) reg = MeetupRegistration(meeting=active_meetup) db.save(reg) class 'sqlalchemy.exceptions.OperationalError

[sqlalchemy] Re: can't setup simple one to many relation

2008-01-29 Thread Alexandre Conrad
Then I don't know. :) Max Ischenko wrote: On 29 янв, 10:47, Alexandre Conrad [EMAIL PROTECTED] wrote: Hello Max, AFAIR, I've had similar problems latelty when having a table with composite primary keys and running SQLite. I think Mike told me SQLite didn't support that. I'm no SQLite user

[sqlalchemy] Re: Can't figure out the joins across many tables with select_from()

2008-01-24 Thread Alexandre Conrad
do, try to find the relation with it. Then figure out that the 'site_client' table is mapped to SiteClient, and keep on finding the next relation 'playlists' to join it with. Good night, and good luck. :) Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You

[sqlalchemy] Can't figure out the joins across many tables with select_from()

2008-01-23 Thread Alexandre Conrad
(), which Im trying to do now, as show above. Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-15 Thread Alexandre Conrad
on Channel; WHERE CatalogChannel.c.id_channel==foo. This is just an idea, but here the join with CatalogChannel.id would mean that is need to figure out that PK is also FK to Catalog. Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-14 Thread Alexandre Conrad
running a under a foo table with MySQL. (another hidden bug, I'm getting (IntegrityError) medias.id may not be NULL). Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-14 Thread Alexandre Conrad
Alexandre Conrad wrote: under a foo table with MySQL. (another hidden bug, I'm getting a foo schema/db, not table. -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-14 Thread Alexandre Conrad
as primary_key=True on both columns). Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-14 Thread Alexandre Conrad
tables for doing the joins. I remember I already played with that select_from syntax, which was working. Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-14 Thread Alexandre Conrad
Mike, My day is over, I'm leaving the office. I'll read your replies tomorrow. Thanks for taking some time one that. Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-13 Thread Alexandre Conrad
= catalog_channels.id which .filter(Catalog.c.id==catalog_channel_table.c.id) generates correctly when explcitly pointing the wanted table. Is that a bug Mike ? Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-13 Thread Alexandre Conrad
Michael Bayer wrote: On Jan 13, 2008, at 1:02 PM, Alexandre Conrad wrote: Anyway, my inital issue according to the subject's title, is that: .filter(Catalog.c.id==CatalogChannel.c.id) generates the SQL query catalogs.id = catalogs.id rather than the expected catalogs.id

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-11 Thread Alexandre Conrad
svilen wrote: On Friday 11 January 2008 16:12:08 Alexandre Conrad wrote: Channel - Playlist - Media Channel - CatalogChannel(Catalog) - Media (Media has a fk to Catalog, not CatalogChannel) The only element I have, is playlist (instance of Playlist). At this point, I need to find out

[sqlalchemy] filter() on inherited class doesn't point to the correct table

2008-01-11 Thread Alexandre Conrad
type column from Catalog, but it doesn't. Mike suggested we would need to extend the API with a new method like join_to_subclass() or so... Even though, I still think SA should figure out which relation I'm looking at... Regards, -- Alexandre CONRAD

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-11 Thread Alexandre Conrad
. The part where .filter(Catalog.c.id==CatalogChannel.c.id) wrongly generates: catalogs.id = catalogs.id So I need to use the table itself: .filter(Catalog.c.id==catalog_channel_table.c.id) correctly generates: catalogs.id = catalog_channels.id This works. Regards, -- Alexandre CONRAD

[sqlalchemy] Re: 'lazy=False' with polymorphic joined tables

2007-12-17 Thread Alexandre Conrad
JOIN addresses ON addresses.id = companies.id_address LEFT OUTER JOIN addresses AS addresses_1 ON addresses_1.id = companies.id_address [...] Sorry, I forgot to check the trunk before sending to the list... Regards, -- Alexandre CONRAD - TLV FRANCE Research Development

[sqlalchemy] 'lazy=False' with polymorphic joined tables

2007-12-14 Thread Alexandre Conrad
? Test case attached. Thank you. Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ 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

[sqlalchemy] Double joined polymorphic inheritance ?

2007-12-13 Thread Alexandre Conrad
): #site_mapper = mapper(Site, site_table, inherits=Company, polymorphic_identity='site') site_mapper = mapper(Site, site_table, polymorphic_on=site_table.c.type, polymorphic_identity='site') Is that possible ? Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: alias problem with polymorphic joined table inheritance

2007-12-12 Thread Alexandre Conrad
Alexandre Conrad wrote: Here is the code I'm working on (sqlite and mysql errors at the bottom): http://rafb.net/p/HlZw3P26.html Here are the relations for clarity: client(company) -- one-to-many - site(company) client(company) -- one-to-many - channel(object) query == site - client

[sqlalchemy] Representation of boolean logic in a database

2007-12-04 Thread Alexandre Conrad
much mind twising. But maybe this has already been standardized somehow. Any idea how this can be achieved ? Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] Re: (solved) Joined Table Inheritance and One-to-One headache

2007-11-14 Thread Alexandre Conrad
://www.sqlalchemy.org/docs/04/mappers.html#advdatamapping_relation_customjoin Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Joined Table Inheritance and One-to-One headache

2007-11-13 Thread Alexandre Conrad
Hi, I've attached a test script as I'm confused with what I'm trying to do. I have the following scenario: - A Channel object is TV channel: class Channel: pass - A Playlist object is a piece of a channel's TV program. class Playlist: pass - A Playlist can be declined as different

[sqlalchemy] Re: FormAlchemy 0.1 released !

2007-09-04 Thread Alexandre Conrad
on the FormAlchemy list: http://groups.google.com/group/formalchemy :) Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] [ANN] FormAlchemy 0.1 released !

2007-08-29 Thread Alexandre Conrad
://formalchemy.googlecode.com Mailing list: http://groups.google.com/group/formalchemy Feedback is appreciated. :) Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group

[sqlalchemy] Re: Join vs. 2 selects?

2007-08-17 Thread Alexandre CONRAD
the actual query. Anyway, all this is nicely documented... :) Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Re: new session docs !

2007-08-10 Thread Alexandre CONRAD
Okay Mike, about scoped_session(), I think I got it right this time. I was trying to get inspired from SAContext, how it's beeing wrapped around with Pylons. Since SAContext has not yet upgraded to SA 0.4, maybe I was just getting inspired from some different mechanism. Or SAContext it doing

[sqlalchemy] Re: refresh() with scoped_session ?

2007-08-09 Thread Alexandre CONRAD
Michael Bayer wrote: I've implemented all the missing class-level methods on ScopedSession in r3212, so you should be able to call refresh(). Great, thanks. I'll check this out. But also, if you want to say Session(), then work with it, that is also the intended usage model, although

[sqlalchemy] Re: refresh() with scoped_session ?

2007-08-09 Thread Alexandre CONRAD
Alexandre CONRAD wrote: Don't forget to answer my question: What are the benefits of instantiating a Session object ?. Actually, I just feel better working *with* a instantiated object. Hey, I just set my code to instantiate the session, and I get the following error when I delete

[sqlalchemy] Re: refresh() with scoped_session ?

2007-08-09 Thread Alexandre CONRAD
Michael Bayer wrote: Hey, I just set my code to instantiate the session, and I get the following error when I delete a client (which has a bunch of cascading all, delete-orphan rules). session = Session() NB: I've mapped the session.delete function to my model object for convenience:

[sqlalchemy] refresh() with scoped_session ?

2007-08-08 Thread Alexandre CONRAD
doing something wrong. Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: *all* *new* *tutorials* !!!!

2007-08-07 Thread Alexandre CONRAD
This *IS* some piece of work ! Mike, you are the One ! :) Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] how to test a Boolean column ?

2007-08-05 Thread Alexandre CONRAD
types can't have their methods here... This is just some request from me to cultivate my lazyness. Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group

[sqlalchemy] Re: UPDATE intelligence

2007-08-04 Thread Alexandre CONRAD
even when the age has not changed ? Mike: is this is actually sent to the database ? If it is, maybe we could avoid this, saving a little network trafic. Although, it has the benefit to show that .flush() has correctly been triggered, but is useless for the DB server. Regards, -- Alexandre CONRAD

[sqlalchemy] Re: UPDATE intelligence

2007-08-04 Thread Alexandre CONRAD
Alexandre CONRAD wrote: I might not be well waken up, but as I'm looking at your generated SA logs, it doesn't show that SA updates the row when the data has not changed. It only seems to update fields that have changed. Or maybe should I say that I don't see the data beeing updated even

[sqlalchemy] Re: Hierachical data

2007-08-04 Thread Alexandre CONRAD
Alexandre CONRAD wrote: Ok, maybe I got influenced by articles about nested sets beeing better, as pointed Mike. Now I got you guys advices, I'll look deeper into adjacency list. I'm glad I've had such feedback on my problem. This defenitly helps, even more when you just don't know from

[sqlalchemy] Re: Hierachical data

2007-08-03 Thread Alexandre CONRAD
Celko's Trees and Hierarchies in SQL for Smarties. Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: Hierachical data

2007-08-03 Thread Alexandre CONRAD
Ok, maybe I got influenced by articles about nested sets beeing better, as pointed Mike. Now I got you guys advices, I'll look deeper into adjacency list. I'm glad I've had such feedback on my problem. This defenitly helps, even more when you just don't know from where to start. Also these

[sqlalchemy] all() or list() ?

2007-08-01 Thread Alexandre CONRAD
Hello, I'm realizing that I've been using .list() to query objects. But all the examples in the docs talk about .all(). What's the difference ? Should I switch to .all() rather than .list() ? Will list be deprecated in 0.4 ? Regards, -- Alexandre CONRAD

[sqlalchemy] Re: all() or list() ?

2007-08-01 Thread Alexandre CONRAD
Gaetan de Menten wrote: What's the difference ? Should I switch to .all() rather than .list() ? Will list be deprecated in 0.4 ? Exactly. list() is the old way, all() is the 0.4 way. Thanks Gaetan, I'll clean up my code to be compliant with 0.4. Regards, -- Alexandre CONRAD

[sqlalchemy] Re: cannot read msg...

2007-08-01 Thread Alexandre CONRAD
yes Glauco wrote: can someone read me? Glauco -- Alexandre CONRAD --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: whats going to break in 0.4

2007-07-02 Thread Alexandre CONRAD
correctly. So I just session.flush() all of it. SA does the work for me. I really don't like #7. I like what you'll be doing on #13. It's nice seeing such effort. Thanks Mike for this great toolkit. Regards, -- Alexandre CONRAD Michael Bayer wrote: hi gang - seems like I am getting

[sqlalchemy] Re: Many to many: No column ... is configured on mapper (since 0.3.7)

2007-05-23 Thread Alexandre CONRAD
for that ? :) Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: simple many-to-many select

2007-04-05 Thread Alexandre CONRAD
as deprecated ? Regards, -- Alexandre CONRAD On Apr 4, 2007, at 5:40 AM, Alexandre CONRAD wrote: Glauco wrote: Alexandre CONRAD ha scritto: Okay, thanks. Any idea if .filter_by() and other new generative method will be available in an assign_mapper object? Yes..it's available, the final

[sqlalchemy] Re: simple many-to-many select

2007-04-04 Thread Alexandre CONRAD
and will be replaced .join() / .outerjoin(). Regards, -- Alexandre CONRAD Michael Bayer wrote: On Apr 3, 12:39 pm, Alexandre CONRAD [EMAIL PROTECTED] wrote: And I'd like to find all attachments from one client. But as there's a weak (secondary) table in between, I can no longer have something like

[sqlalchemy] Re: simple many-to-many select

2007-04-04 Thread Alexandre CONRAD
Glauco wrote: Alexandre CONRAD ha scritto: Okay, thanks. Any idea if .filter_by() and other new generative method will be available in an assign_mapper object? Yes..it's available, the final object has identical property as a mapper Well, model.Client.filter_by(sites=siteobj) doesn't

[sqlalchemy] Re: order_by computed on wrong table with many-to-many

2007-04-02 Thread Alexandre CONRAD
Michael Bayer wrote: use 'sites':relation(Site, backref=backref('attachments', order_by=attachment_table.c.name)) for now. Ok, should I open a ticket for that ? On Mar 30, 5:50 am, Alexandre CONRAD [EMAIL PROTECTED] wrote: Hello, I have a problem with order_by on a many-to-many

[sqlalchemy] order_by computed on wrong table with many-to-many

2007-03-30 Thread Alexandre CONRAD
attachments, attachments_has_sites WHERE %s = attachments_has_sites.id_site AND attachments.id = attachments_has_sites.id_attachment ORDER BY attachments_has_sites.id_attachment the ORDER BY is computed against the weak table (secondary) attachments_has_sites. Regards, -- Alexandre CONRAD

[sqlalchemy] Re: cascading question

2007-03-16 Thread Alexandre CONRAD
, backref=backref(options, cascade=save-update, delete), secondary=options_has_sites, cascade=save-update), }, order_by=option_table.c.name, ) On Mar 16, 2007, at 10:38 AM, Alexandre CONRAD wrote: Hello, I have a many-to-many relation between an option table and a site

[sqlalchemy] Deleting an object with assignmapper fails

2007-01-26 Thread Alexandre CONRAD
: iteration over non-sequence Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: table_foo.c.column_foo.autoincrement returning True always

2006-12-22 Thread Alexandre CONRAD
://groups.google.fr/group/sqlalchemy/browse_thread/thread/4ba17b080d97aaf5 Regards, -- Alexandre CONRAD - TLV FRANCE Research Development --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post

[sqlalchemy] count()

2006-12-08 Thread Alexandre CONRAD
() Should I: 1/ Use the python len() function: len(client_list) 2/ Use the count() query method. But doesn't it re-query the database ? Thanks for your advices. Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] Design question: option mechanism

2006-11-10 Thread Alexandre CONRAD
list) to be assigned for a client, and where every new site hinerits from it's client's option values as default. Then the site can save it's own custum values if default values are not satisfying. Any idea how I could design this ? Regards, -- Alexandre CONRAD

[sqlalchemy] Performing a search

2006-11-06 Thread Alexandre CONRAD
%', '%bla%', '%bla%'] Is this the correct way to do it ? Isn't there a way I could give a list of columns to search in rather than doing it like my example ? Or have a short way to search for the given pattern in all columns ? Regards, -- Alexandre CONRAD

[sqlalchemy] CheckConstraint

2006-10-27 Thread Alexandre CONRAD
it also contains either the given strings in the constraint. If validation fails, we could catch the Column's name or a list of all failed Columns at the Table level. Regards, -- Alexandre CONRAD --~--~-~--~~~---~--~~ You received this message because you

[sqlalchemy] ForeignKeyConstraint or ForeignKey ?

2006-10-17 Thread Alexandre CONRAD
, -- Alexandre CONRAD --~--~-~--~~~---~--~~ 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

[sqlalchemy] automatic datatype for a ForeignKey

2006-10-17 Thread Alexandre CONRAD
('user_id', ForeignKey(users.user_id)), Here, I don't specify that the FK column is an Integer, because some clever mechanics would do that for me. I suppose that this was already thougt before, but I was just wondering... Regards, -- Alexandre CONRAD