Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Oil r fromdb:scaffold - Relationships / Many to Many / etc..
I have a site setup and would like to maintain the db structure. Oil seems to be able to create the scaffolding from the db, but I have join tables that dont seem to be created correctly and neither are the relationships.
I have table: car (id, name) and a table: features (id, feature) . Then I have a join table: car_features (id, car_id, feature_id) . The tables are innodb and have the FKs set up on them for data integrity.
When I did: oil r fromdb:scaffold car, features, car_features, I just got three new models, crontrollers, etc. The models and insert pages dont have the ability to add features to a car.
What did I miss, or is this even possible for Oil?
Oil doesn't do relations, and therefore it doesn't do relation or join tables either.
To maintain your database schema, use migrations. Oil will generate those for the tables themselfs, you will have to add the rest manually.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion