Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.
Custom model in custom module
I'm developing my first application with FuelCMS and i have a question about the models, i have read all the module related tutorials but i couldn't find what I'm looking for.
I have a database table called Categories, it has tree fields
| ID | NAME | PARENT |
The parent field is a reference to the same table and allow to nest the categories. When a category is a base one, (it has no parent) i need to insert in the database the value "-1"
For now i have my models working right but in the form it generates i can only choose between the values that already exists, I was able to hard code a new value into the option list, but i don't know how to tell Fuel that if you select the "nothing" value it have to assign -1 in the DB.
I hope it is clear
Thanks in advanced for your help.