Re: [SQLObject] sqlite foreign key

2006-03-28 Thread jt
> > Could we >Could you? Here is a diff that worked for me. Could you merge it and see if it passes your unit tests? --- mycol.py +++ SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/col.py @@ -732,6 +732,31 @@ kw['name

Re: [SQLObject] Problems with lazyUpdate

2006-03-28 Thread Peter Butler
Hi Felix It should work for inserts (call FormValues(class) instead of FormValues(object=someObject)). I haven't implemented delete yet because I haven't needed it, but it shouldn't be too hard. Cheers Peter Felix wrote: >Hey Peter !! this works only for updates, not for inserts and deletes,

[SQLObject] Eagerload and SQLObject

2006-03-28 Thread Koen Bok
Is there any way to load objects the way eagerload does in sqlalchemy? It fetches all objects and their relations in one query. It is way faster than looping through each object. --- This SF.Net email is sponsored by xPML, a groundbreaking

Re: [SQLObject] sqlite foreign key

2006-03-28 Thread Matt Good
On Tue, 2006-03-28 at 18:48 +0200, jt wrote: > Could we add a "ForeignKey createSql" -> "FOREIGN KEY(colname) > REFERENCES table(id)" when backend is sqlite. I know sqlite do not > enforce them at the moment (3.3.4) but it parses it and check the > syntax. This could be useful in the future, or jus

Re: [SQLObject] sqlite foreign key

2006-03-28 Thread Oleg Broytmann
On Tue, Mar 28, 2006 at 06:48:01PM +0200, jt wrote: > Could we Could you? Oleg. -- Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. --- This SF.

[SQLObject] sqlite foreign key

2006-03-28 Thread jt
Hello, Could we add a "ForeignKey createSql" -> "FOREIGN KEY(colname) REFERENCES table(id)" when backend is sqlite. I know sqlite do not enforce them at the moment (3.3.4) but it parses it and check the syntax. This could be useful in the future, or just right now if we need to reflect things at t

Re: [SQLObject] Problems with lazyUpdate

2006-03-28 Thread Felix
Hey Peter !! this works only for updates, not for inserts and deletes, isnt? On Tue, 28 Mar 2006 10:01:27 +1200 Peter Butler <[EMAIL PROTECTED]> wrote: > Hi Felix > > I had a similar situation. I have a web application which populates > objects, validates them, then commits everything if valid

Re: [SQLObject] some newbie questions

2006-03-28 Thread Oleg Broytmann
On Tue, Mar 28, 2006 at 06:07:41PM +0200, Ivan Horvath wrote: > SELECT pg_index.indisprimary, > pg_catalog.pg_get_indexdef(pg_index.indexrelid) > FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, > pg_catalog.pg_index AS pg_index > WHERE c.relname =

Re[2]: [SQLObject] some newbie questions

2006-03-28 Thread Ivan Horvath
Dear Oleg Broytmann, well, this is the result of the debug: this is too complicated to me, please help me, what i should check 1/QueryAll: SELECT pg_catalog.pg_get_constraintdef(oid) as condef FROM pg_catalog.pg_constraint r WHERE r.conrelid = 'ps_schema.kn

Re: [SQLObject] some newbie questions

2006-03-28 Thread Oleg Broytmann
On Tue, Mar 28, 2006 at 04:13:52PM +0200, Ivan Horvath wrote: > when i try connect to this existing database i receive always a > "No primary key found in table ..." message Add "?debug=1" to the connection URI (postgres:/db?debug=1). This makes SQLObject prints all SQL queries. Look at the

[SQLObject] some newbie questions

2006-03-28 Thread Ivan Horvath
Dear sqlobject-discuss, i've just started using SQLObject, therefore my questions are rather simple, may be "stupid" i use postgres as backend i have already a database, and i have a schema in this database also (different than public) i was able to create a table in this schema spec

Re: [SQLObject] Problems with lazyUpdate

2006-03-28 Thread Felix
Thanks so much Peter, i'll try, then tell you On Tue, 28 Mar 2006 10:01:27 +1200 Peter Butler <[EMAIL PROTECTED]> wrote: > Hi Felix > > I had a similar situation. I have a web application which populates > objects, validates them, then commits everything if validation > succeeds. My solution w

Re: [SQLObject] Problems with lazyUpdate

2006-03-28 Thread Felix
Thanks Brian, i'll try, then tell you On Mon, 27 Mar 2006 13:01:41 +0200 Brian Sutherland <[EMAIL PROTECTED]> wrote: > On Sun, Mar 26, 2006 at 06:37:53PM +0200, Felix wrote: > > - i can't .sync() all updates at same time, i only can: > > > > class table: > > class sqlmeta: >