Hi Winston, Sorry, I left for vacation Thursday evening and checked in that code in a hurry without fully testing it. Several months ago the 'sqlIdName' method was replaced by 'sqlSerialColumnName', and I didn't catch this before committing my code. I've just fixed this in CVS, so you'll just need to do an update to fix this.
peace, Jason > I'm trying to get Jason's postgres support working, and I run into a > little problem. It seems the sqlIdname() method doesn't appear in > MiddleKit.Core.Klass. See the code and stack trace below. I had > noticed a similar sqlIdName() method in the Postgres support from > before Jason checked in his new files. Could it be that one file was > not checked in? > > -winston > > --- Here is the code I was running: > > from mx.DateTime import DateFrom > from MiddleKit.Run.PostgreSQLObjectStore import PostgreSQLObjectStore > > from db.User import User > > if __name__=='__main__': > # Set up the store > store = PostgreSQLObjectStore() > store.readModelFileNamed('lib/db/mentor') > > u = User() > u.setNameLast('wolff') > u.setNameFirst('winston') > > store.addObject( u ) > store.saveChanges() > > --- Here is the stack trace: > > SQL 0001. 2004-08-29 14:14:19 select id, name from _MKClassIds; > Traceback (most recent call last): > File "bee.py", line 26, in ? > store.saveChanges() > File > "/Users/winstonw/svn/Projects/python/extern/WebWare-CVS/webware/ > MiddleKit/Run/PostgreSQLObjectStore.py", line 78, in saveChanges > SQLObjectStore.saveChanges(self) > File "MiddleKit/Run/ObjectStore.py", line 310, in saveChanges > File > "/Users/winstonw/svn/Projects/python/extern/WebWare-CVS/webware/ > MiddleKit/Run/SQLObjectStore.py", line 213, in commitInserts > self._insertObject(object, unknownSerialNums) > File > "/Users/winstonw/svn/Projects/python/extern/WebWare-CVS/webware/ > MiddleKit/Run/PostgreSQLObjectStore.py", line 49, in _insertObject > seqname = "%s_%s_seq" % (object.klass().name(), > object.klass().sqlIdName()) > AttributeError: Klass instance has no attribute 'sqlIdName' > > On 29-Aug-2004, at 8:36 AM, Winston WOLFF wrote: > >> Jason and Diogo- >> >> I want to thank you also for this PostgreSQL support. I just happen >> to be starting to play with middle kit, the timing of this thread is >> uncanny. Perhaps I'll work on datetime support since I will probably >> need it. >> >> -winston >> >>> From: Jason Hildebrand <[EMAIL PROTECTED]> >> <msg.gif> Re: MiddleKit PostgreSQL support >>> 2004-08-26 18:31 >>> >>> Hi Diogo, >>> >>> Thanks for asking. Last year I did some work with PostgreSQL and >>> MiddleKit, and had lots of local changes which I"ve been meaning to >>> commit. >>> Specifically, I made it so that for each table, a corresponding >>> postgres >>> sequence is created, which is used for getting the next serial number >>> when an object is added to the data store. There were a bunch of >>> other >>> changes, too, but that was the most significant. >>> >>> There are several different python bindings for PostgreSQL, but >>> AFAICT >>> there are only two which are maintained: the bindings included with >>> PostgreSQL itself, and psycopg. I can"t remember exactly why, but >>> at that >>> time I had some problems with PostgreSQL"s bindings, and so I used >>> pscyopg. >>> >>> I"ve just checked in these changes, so please do a fresh CVS >>> checkout (it >>> may take a few hours to become available on sourceforge"s anon CVS, >>> I"m not >>> sure) and take a look. Since I haven"t really used it since last >>> year, >>> there might be a few things which aren"t working any more (due to >>> other >>> changes in MK), and I think there are a few MK datatypes which still >>> need to >>> be implemented for PostgreSQL (i.e. datetime?). >>> >>> If you improve the support further, please submit patches via >>> sourceforge, >>> and maybe send me a heads-up, too, so that I notice. :) >>> >>> peace, >>> Jason >>> >>> >>> On Tue, 2004-08-24 at 09:06, Diogo Biazus wrote: >>> > Hi People, >>> >>> > I"ve read some mails about recent patches to make middlekit work >>> with >>> > pgsql. How can I install and use these patches? >>> > Can I help in any way to test or develop it? >>> > I"m really in need of the PostgreSQL support, and I"m willing to >>> help >>> > build it. >>> >>> > Thanks in advance, >>> -- >>> Jason D. Hildebrand >>> T: 204 775 1212 >>> E: [EMAIL PROTECTED] >> >> >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_idP47&alloc_id808&op=click > _______________________________________________ > Webware-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/webware-devel > > !DSPAM:413248b6260201118715257! > > > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel