Welcome Guest, Not a member yet? Register   Sign In
Unknown column 'email' in 'field list'
#21

[eluser]stoefln[/eluser]
[quote author="xwero" date="1236032497"]So we have four solutions:

- a object/variable white list for the models.
pro : flexible
con : configuration

- a namespace for controller connected objects/variables
pro : no collisions with local variables
con : additional typing (CI->)

- don't attach the instance, helper syntax
pro : only code change to core is removing the attaching of the controller objects/variables
con : more code in the models

- don't attach the instance, kohana syntax
pro : controller variables/objects stay in controller scope
con : will require ugly php4 hack

If we look at the resources, i don't know if it really matters, the namespace solution is as wastefull as the current solution or even a bit more. The white list is a little less wastefull and the don't attaching solutions are the most resource friendly.

If we look at the backwards compatibility the white list solution is the best way to go as it requires no changes in the current models code.[/quote]

I m 100% with you.
#22

[eluser]_Dannoso_[/eluser]
I've experienced the same problem too.
Exactly with 'email' field in my 'users' model.
Finding the issue made me crazy!
I couldn't imagine having my email property overwrited by library class 'email'!

My workaround was:
- don't autoload email class
- load when needed as "mailer"

But IMO general libraries class can't have such commom names.
Collision is behind the corner!

Davide




Theme © iAndrew 2016 - Forum software by © MyBB