It seems that in v3.1.0 of Kohana's ORM that the _ignored_columns
property has been removed.
What the is the recommended technique to dealing with fields that aren't in the databases? The case I have right now is password_confirm where password is a field, but we require the user to enter their password twice.
You can pass an extra validation object to save, create and update. So your example would look like:
Notice how the password validation is passed into the create method.
The
$keys
value specifies which values should be saved into the model. "password_confirm" was not in that list so it is ignored. This feature is security related too, you wouldn't want users manually setting the id in their POST request.Then you can create a user by calling
create_user
: