Re: unhappy with generated getTo methods

From: Heiko.Erhard..i-de.com
Date: Mon Feb 20 2006 - 08:24:48 EST

  • Next message: Tobias SCHOESSLER: "Re: unhappy with generated getTo methods"

    Andrus,

    I submitted some extensions re. the naming stuff this weekend, see
    http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-457

    We would be happy to see this in the upcoming versions so we don't have to
    patch each version because we depend on this extension.

    Since I'm new to Cayenne commitment, I assume somebody having commit
    permission
    will check this in. In addition to the patch.txt changes, I added a ZIP
    archive w/ the new files (which weren't considered by cvs diff).
    There is also a readme.txt file in the archive desribing the new files and
    pointing to an issue I'm not sure of...

    Tobias: I also tried to address the naming relationship naming issue you
    brought up in your post.
    Was not as easy as I initially expected it to be. I'd be interested if this
    works for you.

    --
    Heiko Erhardt
    

    Tobias SCHOESSLER <Tobias.Schoessle..nvienna.org> schrieb am 14.02.2006 09:49:56:

    > > hi, I sent this before, am not sure if it got through, I could't find my > post in the archives, so excuse me if it is a repost. > > I am not happy with the generated code for some of my databases structures > ... > > If a tableA has more than one foreign key relationship to the same other > tableB the generated getToTableB methods look like this. getToTableB1, > getToTableB2, getToTableB3 ... > Wouldn't it be better to have these methods named after the attribute of > the destination foreign key? if the foreign key attributes are attrA, > attrB, attrC. something like getToAttrATableA, getToAttrBTableB, ... > > This way If you have speaking attributes the relationship is much better > described. getToBadPainting, getToGoodPainting. A possibility would also to > pick up the name of the Constraint used to describe the foreign key > relation ... > > I tried to change this with a custom vl template but had problems getting > to the destination attribute from a Relationship ,,, maybe this should be > done somewhere else anyway... when the Realtionship's name is created > during reverse engineering process. > > I know the mapping can be changed manually, but I am trying to minimize the > manual work to be done to the mapping after reverse engineered. > > > > ______________________________________ > Tobias Schoessler, Java Developer > Information Management Unit > Information Technology Service > United Nations Office on Drugs and Crime > > Tel: (+43-1) 26060-5173 > Websites: www.unov.org, www.unodc.org > ______________________________________ > Impossible is not a fact, only an opinion >



    This archive was generated by hypermail 2.0.0 : Mon Feb 20 2006 - 08:25:05 EST