Ticket Details

Misconfigured models bound to relational databases should throw exceptions

ENHANCEMENT Ticket (closed)

If a model bound to a relational database can't find its table, or if the key designated as primary doesn't exist in the schema, the database layer should throw an exception.
on 07.14.10 reported by: nate owned by: Howard

Updates

on 03.08.11 by nate
  • owner was changed to Howard
  • status was changed to approved
My suggestion would be, on the first call to `Model::schema()`, after the schema is pulled from the database, verify that the schema is not empty, and the primary key exists.
(fixed) on 03.08.11 by Howard
Added in 

[http://dev.lithify.me/lithium/commits/view/904417d1f1b74034b021227a59d7e829d15aaa3d](http://dev.lithify.me/lithium/commits/view/904417d1f1b74034b021227a59d7e829d15aaa3d)