Who is handling the restricted qualifier

From EOFWiki
Jump to navigationJump to search

The restriction qualifier on an EOEntity (like type = 1) is appended by EOSQLExpression to the EOQualifier of every SELECT statement. INSERT statements do not add this qualifier and neither do update or delete statements. Update and delete use the snapshot of the EOAdaptorOperation, which in turn was pulled from the EODatabase, and assume that the restricted attributes are in there.

MulleEOF should issue a warning in Debug modes, if these assumptions aren't met by the caller.

EOAdaptor writers that override SELECT generation must remember to generate SQL for the restricting qualifier.

TODO

Either ensure that the restricting qualifiers attributes are not class property, and place them manually into the inserted values and add the restriction qualifier to the update/delete qualifiers.


Or ensure that the restricting qualifier's attributes are class properties.

What would happen in mixed mode ? (type1 = 1 and type1 = 2)