From: Robby D. <ro...@ve...> - 2004-06-22 05:11:55
|
Hey guys, This has to do with both CMFMember (2.0beta2) and AT (1.3b2), so I'm posting to both lists. Basically, I'm using SQLStorage with my own CMFMember type. Most everything is going fine, but I would like to store the CMFMember 'id' (username) and 'password' fields in the database as well. I've fooled with this for hours, trying to get it to work. Here's what I've tried: 1. copying the Username and password field schema text from CMFMember/Member.py (I believe) into my custom schema to override the default ones, and adding the SQLStorage line (storage=DB2SQLStorage() for me) line at the end. This seemed the most direct but was a no go. 2. Then I got the idea to make two more fields (call them 'myusername' and 'myuserpass') instead and replicate the data from self.getId() and self.getPassword() into them, via custom accessor and mutator methods. I tried about everything I could think of here, also a no go. When I would create a user via the join form, the get accessors would eventually show the right userid and password, but that would never get committed to the database via SQLStorage. Both of these methods always yielded no text in the appropriate username and password DB fields. What I'm wondering is if anyone has done this before, or if anyone has any idea how to go about this and could give me some pointers. At this point I'm thinking that the choice of storage layer for a given field impacts the generation of that field's AT-made mutators and accessors (i.e. I might have to grab the storage object myself and do a set() for the fields within their mutators?) Thanks for ANY help! Robby |