Re: Modeler - Names at singular after reverse engineering?

From: Jeff de Vries (jdevrie..frog.com)
Date: Sun Nov 20 2005 - 14:21:07 EST

  • Next message: Jürgen Saar: "Re: Modeler - Names at singular after reverse engineering?"

    While we're discussing this, I'd like to bring up again my request to
    have the option to have relationship names be based on the field name,
    rather than the destination class. So, for example, if you had:

    create table person (
        id int4 primary key,
        ... other stuff ...
    )

    create table sale (
        buyer int4 foreign key person(id),
        seller int4 foreign key person(id),
        ... other stuff ...
    )

    the relationships from sale to person would be called "toBuyer" and
    "toSeller" instead of "toPerson" and "toPerson1" (which is what happens
    now).

    Perhaps add an option to drop a trailing "_id" from the field name, so
    that "buyer_id" would map to "toBuyer" instead of "toBuyerId", or maybe
    use Adam's regular expression idea here as well to singularize names.
    So there'd be (at least) three options:
    1. Use destination class name [what happens now]
    2. Use field name
    3. Use regular expression based on field name [to handle trailing "_id" etc]

    *** ALSO ***

    Add more information to the ObjRelationship Inspector window to indicate
    *which* field is being used for the relationship, so you'd see
    "sale(buyer) -> person(id)" and "sale(seller) -> person(id)" instead of
    just "sale -> person" and "sale -> person" (which is what happens now
    and makes it impossible to tell which relationship is being used).

    Thanks,

    Jeff "Squeaky Wheel" de Vries



    This archive was generated by hypermail 2.0.0 : Sun Nov 20 2005 - 14:21:13 EST