Re: [Zope-dev] ZPatterns and SQL

2001-02-19 Thread Christian Scholz
Hi! So as the item is an instance of my ZClass containing also an company_name attribute it will always return the item and because of that the Rack thinks it's already there. So why is this happening? What do I need to change? You need to use an attribute which the object has *if and

Re: [Zope-dev] ZPatterns and SQL

2001-02-19 Thread Phillip J. Eby
At 05:29 PM 2/19/01 +0100, Christian Scholz wrote: You need to use an attribute which the object has *if and only if* it exists in the database. If the class has the attribute defined, all instances exist, and you can't even load it with SkinScript because ZPatterns uses __getattr__ to

Re: [Zope-dev] ZPatterns and SQL

2001-02-19 Thread Christian Scholz
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

Re: [Zope-dev] ZPatterns and SQL

2001-02-19 Thread Phillip J. Eby
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