Skip to content

Instantly share code, notes, and snippets.

@iammerrick
Created February 8, 2011 07:10
Show Gist options
  • Save iammerrick/816022 to your computer and use it in GitHub Desktop.
Save iammerrick/816022 to your computer and use it in GitHub Desktop.
<?php
try
{
$user = ORM::factory('user');
$user->name = 'Merrick';
$user->save();
$profile = ORM::factory('profile');
$profile->name = 'What up.';
$profile->save();
}
catch(ORM_Validate_Exception $e)
{
$errors = array_merge($e->errors->profile, $e->errors->user);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment