Re: [Zope-dev] ZPatterns and SQL
Hi!
So I shouldn't define it inside the ZClass propertysheet? Do I understand this right? (I remember having problems when using properties not defined in a sheet somewhere.. or am I mistaken completely somehow? ;-)
You can't do this with a load attribute, because a default value will exist. The easiest way to deal with this is simply to have a seperate attribute name just for loading, or use an attribute that isn't on a property sheet.
Ok, I now removed customer_id (which won't be set anyway as this is the id set by the database automatically) from the propertysheet and used this as loading attribute. Seems to work now :) (though I am still confused a little, as I tried one non-existing attribute and it didn't work. But this one also was not defined inside the SkinScript and the database). But it's working now, so it's ok :) Thanks again! Christian -- COM.lounge http://comlounge.net/ communication & design info@comlounge.net
At 05:50 PM 2/19/01 +0100, Christian Scholz wrote:
(though I am still confused a little, as I tried one non-existing attribute and it didn't work. But this one also was not defined inside the SkinScript and the database).
As I said, the attribute must exist if and only if the row is in the database. Thus, it must *not* exist on the propertysheet, and it *must* exist in your SkinScript.
participants (2)
-
cs@comlounge.net -
Phillip J. Eby