Re: auto class generated by 1.2M6 gets compile warning

From: Mike Kienenberger (mkienen..mail.com)
Date: Thu Nov 03 2005 - 18:30:43 EST

  • Next message: Bryan Lewis: "Re: intermittent exception"

    [I wrote this into the issue tracker as well. You'll probably want to
    comment there from now on (make sure you're watching the issue), and
    we should probably move the thread there.]

    Jeff,

    isContainingListProperties determines whether the List import gets
    included in cgen v1.1. Unfortunately, that method uses
    entity.getRelationships() instead of
    entity.getDeclaredRelationships(), which is what the template uses
    later to iterate through the relationships. I don't know that we
    could safely change the result returned without breaking backward
    compatibility in custom templates. We'd probably need to create a
    isContainingDeclaredListProperties method and change the default
    template to use it.

    Andrus,

    How do you feel about switching the default cgen version (and the 1.2
    modeler) from v1.1 over to v1.2?

    At this point, it's well-tested, and should be producing better code
    than cgen v1.1.

    Maybe from a backwards-compatibility standpoint, it makes more sense
    to just switch the modeler over, though, since that won't break
    anyone's ant scripts. However, that'd give two different generated
    results depending on whether someone was using the modeler or ant to
    generate their classes.

    On 11/3/05, Jeff de Vries <jdevrie..frog.com> wrote:
    > More info:
    > It's only in the superclass classes that are generated for ObjEntities that
    > inherit from another ObjEntity (which possibly must have a one-to-many
    > relationship).
    >
    > I'll file a bug report.
    >
    >
    > Jeff de Vries wrote:
    > Well, I don't know how to check if I have an "actual velocity template",
    > but as far as I can tell I'm doing the same thing that I did with 1.2M5 and
    > 1.2M4 and the generated classes from those didn't produce the warnings that
    > I'm seeing with 1.2M6.
    >
    > Jürgen Saar wrote:
    > Jeff,
    >
    > are you sure that you have a actual velocity template?
    >
    > I think this was in an early superclass-template,
    > in the actual one I think there is a 'if' to check
    > the List class to be used (is there a 1->n relation?).
    >
    > It should be no modeler problem.
    >
    > --- Juergen ---
    >
    >
    > cayenne-use..bjectstyle.org schrieb am 31.10.05 23:28:26:
    >
    >
    > Using the 1.2M6 Modeler to generate classes, I get compiler warnings
    > from each of the _auto classes:
    > "The import java.util.List is never used." (which is indeed the case).
    >
    > This didn't happen with previous versions of the Modeler.
    >
    > Jeff de Vries
    >
    >
    >
    > ______________________________________________________________
    > Verschicken Sie romantische, coole und witzige Bilder per SMS!
    > Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Nov 03 2005 - 18:30:49 EST