To be honest, I don't think either are great solutions, because:

- if we put the code in our data model, then only that model can access
that function, we'd have to duplicate the code for other models that
might want to use an enum field.

- that snippet doesnt work with tables with underscores, to remedy that
you can $this->table
rather than doing this...
$tableName = strtolower(Inflector::pluralize($this->name));
Also if I create my own AppModel with the getEnumValues method in, that
resides in my app/models directory, I get errors. It only works when I
add the method to the cake/app_model.php class.

Anyway, it would be nice to get this updated in Cake, its a bit
inconsistent to have the functionality in the scaffolding but not
available in the model functionality. Is it just a case of submitting a
new ticket on the trac repository to get it looked at?

Cheers

James


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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