Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Problem with plural and legacy system.
  • 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.

  • 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.

  • 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.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion