Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Oil
Problem with plural and legacy system.
diegoszch
April 2014
hello everyone!
I have problem with generate tables in oil scaffold, because my tables have name in portuguese and the rules plural are different.
Example:
Singular Plural Language
Version Versions English
Versao Versoes Portuguese
How can I solve this?
Other problem is that we have legacy system written in Cobol and we develop a link with MySQL, but the tables name follow a crazy pattern.
Table Name Description
SCCCAD Costumer
ESTCAD Product
What problems will I have?
Yours faithfully.
Harro
April 2014
No problem.
You don't say what you generate, but both Model_Crud and ORM allow you to define the tablename by hand using a property. Just generate the code, and then add/update the property manually.
mikepmtl
April 2014
In case they are already created, you simply add:
Class Model_Product extends Orm\Model {
protected static $_table_name = 'ESTCAD';
...
to the Model's class.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
April 2014
mikepmtl
April 2014