Sorry I couldn't see the mail before.

Well, this is not an error but a behavoir I need to implement. The exception should be generated from the object when trying to change the status field to a status not allowed.

This means when creating a new entry, it should allow to create either an "Enable" or "Disable" object but later changing from "Disable" to "Enable" should generate an exception.

I need to write a _set_state that understand when the call was generated from a StatedObject(state=....) from a a.stat=....

Thanks and regards

On 10/30/05, Oleg Broytmann <phd@mail2.phd.pp.ru> wrote:
On Sat, Oct 29, 2005 at 06:23:02PM -0400, Julio O?a wrote:
> class StatedObject(SQLObject):
> state=EnumCol(enumValues=["Enable",
> "Disable"])
> disabled.state="Enable"
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> change not allowed.

   What OS? DB? Driver? SQLObject version? Can you show the full traceback?

     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
sqlobject-discuss mailing list