Skip navigation.

Xyster 6 - validate issues

Hello,

Thanks for the new Xyster release,

We have some issues with the new validator functionlity in the ORM classes.

  • When using bigint in the database Xyster uses the Zend Int Validator, which gives problems if the bigint is a really 'bigint'.
  • When we define on database level a field as NOT NULL, by example a bit field, the validator will check on NotEmpty whick means we cannot insert the value 0, what should be possible.
  • When we have an entity with an one-to-one relation to another entity and we want to 'break' this relation we can do this by setting the 'foreign key' to NULL. Xyster breaks on the validation cause of the int check. Is there another way or should there be an exception for the foreign key (just like for the primary)?

We use Zend Framework 1.5.2 and the database is MSSQL.

You're right

Han— Thanks for downloading build 6, and thanks for letting us know about the problems you've run into. You're basically right about the problems you've described.

  • The Int validator shouldn't go on a bigint field, can you please add this as a ticket?
  • We probably need to create a validator that subclasses NotEmpty and make it check for specifically NULL values, not just 0 and empty strings. If the developer wants, he or she can add the 'NotEmpty' validator to a field if it really can't hold non-empty values. Can you add this as a ticket, too?
  • Just a note—if you set the relation to null, the entity will set the foreign key(s) to null also. Do you mean that Zend_Validate_Int fails if the value is null? I think this is the case, which is a problem. Go ahead and file this as a ticket, also, please.

Thanks again, Han.

-DC

User login