Menu

#28 Entity names ending in 'ies' not handled properly

open
Primate
None
5
2008-06-24
2008-05-28
Primate
No

build-r61. Example entity name: Strategies

create_entity.sh - Tries to name the module 'strategie' instead of 'strategy'.

GlobalHelper - cleanChild() - Turns StrategiesPeer into 'strategie'. Should transform into 'Strategies' and do entity table lookup based on 'peer_root' field.

Discussion

  • Primate

    Primate - 2008-05-30

    Logged In: YES
    user_id=1301905
    Originator: YES

    Browse Results: should use a plural form from the entities table. Currently:
    "Results 1 to 1 of 1 strategys"

     
  • Primate

    Primate - 2008-05-30

    Logged In: YES
    user_id=1301905
    Originator: YES

    When adding a record (executeAdd):

    Fatal error: Class 'StrategysPeer' not found in /var/www/build-r61/wiser_platform/lib/model/GenericModel.php on line 279

     
  • Rehan Iftikhar

    Rehan Iftikhar - 2008-06-24
    • assigned_to: nobody --> prim8
     
  • Primate

    Primate - 2008-06-27

    Logged In: YES
    user_id=1301905
    Originator: YES

    Here is the solution I'm using. The entities table already has both plural and singular forms, so I just wrote a lookup method in EntitiesPeer and any place I saw the "non-optimal" code I replaced it with my lookup. This has the added benefit of getting rid of the special cases for the 'aof' entity type also.

    I'll attach the patches from my customized r61 build.
    File Added: EntitiesPeer.php.patch

     
  • Primate

    Primate - 2008-06-27

    Patch from customized r61 build

     
  • Primate

    Primate - 2008-06-27

    Logged In: YES
    user_id=1301905
    Originator: YES

    File Added: GenericModel.patch

     
  • Primate

    Primate - 2008-06-27

    Patch from customized r61 build

     
  • Primate

    Primate - 2008-06-27

    Patch from customized r61 build

     
  • Primate

    Primate - 2008-06-27

    Logged In: YES
    user_id=1301905
    Originator: YES

    File Added: GenericPeer.patch

     

Log in to post a comment.

MongoDB Logo MongoDB