From kobold at kobold.it Fri Aug 11 23:55:54 2006 From: kobold at kobold.it (Fabio Tranchitella) Date: Fri, 11 Aug 2006 23:55:54 +0200 Subject: [Z3-sqlos] New features for sqlos Message-ID: <20060811215554.GA25193@ulisse.dmgroup.hu> Dear sqlos developers, while writing a zope3 application and using sqlos, I needed a few things that sqlos didn't offer out-of-the-box. For example, I used very often join sqlobject's constructs but sqlos doesn't support to access to the "joined" objects from a sqlobject, for example from: http://localhost/myapp/persons/fabio all the lists of his dogs: http://localhost/myapp/persons/fabio/dogs and here a specific dog: http://localhost/myapp/persons/fabio/dogs/fido with dogs defined as: class Person: ... dogs = MultipleJoin('Dogs') One of the most interesting things is that you can use RelatedJoins (Many-to-Many relationships), so for example you can access to the same objects using different paths: http://localhost/myapp/persons/fabio/companies/dotcom http://localhost/myapp/companies/dotcom/employees/fabio I also needed a customized SQLObjectContainer which contains objects froma single factory, so I can get rid off of those long names (eg. sqlos.somename.Person.fabio) and start using only the key.split(".")[-1]. For these reasons, I started a fork of sqlos named zsqlobject, which shares almost all the base code from sqlos but adds new features like the ones explained below. Now, here is my question: is there interest in merging my changes upstream, so I can stop my fork and start collaborating with sqlos? I see no reason to keep the efforts duplicated, and I'm sure other users need these features (i.e. http://codespeak.net/pipermail/z3-sqlos/2006-June/000125.html). Thanks for your attention, -- Fabio Tranchitella http://www.kobold.it Free Software Developer and Consultant http://www.tranchitella.it _____________________________________________________________________ 1024D/7F961564, fpr 5465 6E69 E559 6466 BF3D 9F01 2BF8 EE2B 7F96 1564 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://codespeak.net/pipermail/z3-sqlos/attachments/20060811/0bec6b84/attachment.pgp From florian_reiser at gmx.de Thu Aug 31 09:29:51 2006 From: florian_reiser at gmx.de (Florian Reiser) Date: Thu, 31 Aug 2006 09:29:51 +0200 Subject: [Z3-sqlos] TypeError: "Could not adapt" when creating SQL-connection Message-ID: <20060831072951.19610@gmx.net> Hello, I've created an SQL-Folder using SQLObjectContainer. When adding the object to Zope3.2.1, I get an TypeError stating: "Could not adapt". With pdb I found out that the error occurs in sqlos/connection.py line 78 stating: "conn = IZopeSQLConnection(zda())". I've configured my sql-connection as follows: What can I do to get the folder working? With kind regards Florian Reiser -- "Feel free" ? 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From kobold at kobold.it Thu Aug 31 10:52:43 2006 From: kobold at kobold.it (Fabio Tranchitella) Date: Thu, 31 Aug 2006 10:52:43 +0200 Subject: [Z3-sqlos] TypeError: "Could not adapt" when creating SQL-connection In-Reply-To: <20060831072951.19610@gmx.net> References: <20060831072951.19610@gmx.net> Message-ID: <1157014363.4510.8.camel@eszakisark.kobold.it> Il giorno gio, 31/08/2006 alle 09.29 +0200, Florian Reiser ha scritto: > Hello, > > I've created an SQL-Folder using SQLObjectContainer. > When adding the object to Zope3.2.1, I get an TypeError stating: > "Could not adapt". With pdb I found out that the error occurs in > sqlos/connection.py line 78 stating: "conn = IZopeSQLConnection(zda())". What database adapter are you using? At the moment, you need to specify it in an explicit way. See the sqlos's configure.zcml: Cheers, -- Fabio Tranchitella http://www.kobold.it Free Software Developer and Consultant http://www.tranchitella.it _____________________________________________________________________ 1024D/7F961564, fpr 5465 6E69 E559 6466 BF3D 9F01 2BF8 EE2B 7F96 1564 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio firmata digitalmente Url : http://codespeak.net/pipermail/z3-sqlos/attachments/20060831/2087b4eb/attachment.pgp From florian_reiser at gmx.de Thu Aug 31 11:11:41 2006 From: florian_reiser at gmx.de (Florian Reiser) Date: Thu, 31 Aug 2006 11:11:41 +0200 Subject: [Z3-sqlos] TypeError: "Could not adapt" when creating SQL-connection In-Reply-To: <1157014363.4510.8.camel@eszakisark.kobold.it> References: <20060831072951.19610@gmx.net> <1157014363.4510.8.camel@eszakisark.kobold.it> Message-ID: <20060831091141.146190@gmx.net> Thanks Fabio, that was it. With kind regards Florian Reiser -------- Original-Nachricht -------- Datum: Thu, 31 Aug 2006 10:52:43 +0200 Von: Fabio Tranchitella An: Florian Reiser Betreff: Re: [Z3-sqlos] TypeError: "Could not adapt" when creating SQL-connection > Il giorno gio, 31/08/2006 alle 09.29 +0200, Florian Reiser ha scritto: > > Hello, > > > > I've created an SQL-Folder using SQLObjectContainer. > > When adding the object to Zope3.2.1, I get an TypeError stating: > > "Could not adapt". With pdb I found out that the error occurs in > > sqlos/connection.py line 78 stating: "conn = IZopeSQLConnection(zda())". > > What database adapter are you using? At the moment, you need to specify > it in an explicit way. See the sqlos's configure.zcml: > > > > provides=".interfaces.IZopeSQLConnection" > for="zope.app.rdb.interfaces.IZopeConnection" > permission="zope.Public" > factory=".adapter.PostgresAdapter" > /> > > Cheers, > > -- > Fabio Tranchitella http://www.kobold.it > Free Software Developer and Consultant http://www.tranchitella.it > _____________________________________________________________________ > 1024D/7F961564, fpr 5465 6E69 E559 6466 BF3D 9F01 2BF8 EE2B 7F96 1564 -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal f?r Modem und ISDN: http://www.gmx.net/de/go/smartsurfer