Hello, if i consider this tables:
Customer
-----------------------------
id, name, surname
AND
Address
-----------------------------
id, address, number, city, customer_id
Customer has more addresses, so:
$address = R::dispense...
$address->import(...); // for instance, from $_POST['address']
$customer = R::dispense...
$customer->import(...); // for instance, from $_POST['customer']
$customer->ownAddress[] = $address;
try {
R::store($customer);
} catch (ModelException $e) {}
In this case, how do model validations work?
I have to throw exception once and retrieve errors of both at the same time; but there are two model-validations which need two exceptions.