Ludwig Magnusson wrote:
> Hi!
>
> When torque generates set methods for foreign keys, the methods thorws a
> TorqueException.
>
> Why is this? There is nothing in the methods that throws a TorqueException
> and removing the throws clause does not generate a compiler error.
Setting a foreign key could cause a consistency problem with the
database. If the record the foreign key points to does not exist, you
will get an exception on save() (depending on your schema). So this
Exception exists to allow you handling this problem beforehand. There is
no default action for this situation.
Bye, Thomas.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
|