Meet CodeIgniter MY_Model |
Have you considered writing a schema explorer to aid in validation/relationships? I've only spent about an hour on my version so far but it was trivial to add schema exploring which reduces the amount of presets you need to define a model.
https://github.com/monsterlane/codeignit..._Model.php Since you can read the full schema you can define defaults based on type/non-null or comments. You could probably extend this to cover joins off foreign keys by aliasing fields using the table name as a prefix. So far I'm using it to auto detect the primary/soft delete keys and default values but I plan on adding a lot more. |
Welcome Guest, Not a member yet? Register Sign In |