Hi everybody,

I'm developing a test application on top of a SQLite database. As you
probably may know, by default *integrity checks* on SQLite database
are disabled, and in order to activate them you need to issue the
following query once the connection with the database has been
enstablished:

PRAGMA foreign_keys = ON;

So I implemented a ``beforeSave`` for my models and execute a query
with that string (I know executing it more than once, but for the
moment that inefficiency does not represent a problem). Everything
works as expected: integrity across db tables is now always
guaranteed.

I'm here because I would like to know if it is possible to force
cakephp not to raise 500 error for database errors; if I add a comment
to a nonexistent post I get a 500 error instead of a *failing*
Model->save(), hence the only thing I have to do is to put the call to
Model->save() inside a try/catch block. Are there any alternatives to
this?


Regards,
Matteo

-- 
http://www.matteolandi.net/

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to