Re: How to create cayenne datamap on the fly

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Jul 08 2007 - 11:16:37 EDT

  • Next message: mr.abanjo: "Re: How to create cayenne datamap on the fly"

    On Jul 8, 2007, at 2:10 PM, mr.abanjo wrote:

    > Hi Andrus,
    > few further questions for you:
    >
    > 1) The web page "
    > http://cayenne.apache.org/doc20/generic-persistent-class.html" has
    > a link to
    > a sample code.. but it desn't work. A sample,is for me, a great
    > help for
    > speed up my work. Is possible to have it?

    Good catch, here is the correct link:

    http://cwiki.apache.org/CAY/generic-dataobjects-example.html

    > 2) The datamap xml file, that should map java object to database
    > object, is
    > still required? I usually write in it, the package and the name of the
    > concrete class..

    Isn't it what you were going to generate via a servlet dynamically?
    Of course whatever the servlet generates has to look no different
    from what the modeler would generate, so yes - entries for obj-
    entities and db-entities are required.

    > 3) If the datamap xml file is no more required, how Cayenne know which
    > table are connected to my java classes, how it knows which is the
    > primary
    > key.. ecc...?

    It doesn't, see above.

    Andrus



    This archive was generated by hypermail 2.0.0 : Sun Jul 08 2007 - 11:17:00 EDT