Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Originally posted by edulid View Post
    I have a simple table with its datasource, say having fields id, field1, field2, and field3.

    I got an insert request from the client. I want that no duplicates are inserted to the table regarding field1 and field2 only (so id and field3 are ignored).
    Hello all,

    it seems that this is now already supported out of the box. See the 5.0p ValidatorType.ISUNIQUE-docs.
    Originally posted by docs
    The uniqueness check is performed across the whole DataSource unless you specify property validator.criteriaFields as a comma-separated string of field names; in that case, the uniqueness check is done in the context of those extra criteria...
    I did not try it, but it seems that my code is unnecessary. The notion of this is already in current 4.1p docs, but I don't know how long the function has been there. Seems I overlooked it or it was not there when I did my solution in 4.0p (or before).

    Best regards,
    Blama

    Comment

    Working...
    X