Re: HSQLDB

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Feb 27 2006 - 08:09:43 EST

  • Next message: Andrus Adamchik: "Re: Prefetched Query"

    A DataMap corresponds to a single node, so it can't be shared by
    multiple nodes... within the same DataDomain. So maybe you can create
    two DataDomains, and in runtime "share" the map from one with another
    (as the Modeler wouldn't allow that).

    Then you can get two DataContexts (one for each domain) and use
    DataContext.localObject(..) to transfer objects from source to target
    context.

    Andrus

    On Feb 27, 2006, at 1:04 PM, Pirola Davide wrote:

    > Another question..
    > I have different node in my cayenne.xml file.
    > 2 node point to Oracle database, and the last point to HSQLDb.
    > I want to read some data from Oracle and write it to HSQLDb.
    > Each nodes have the same datamap.xml file.. so i am trying to use
    > the same obj-enity and db-entity for read data from Oracle and
    > write to HSQLDB.
    > Is this possible or i must create different datamap.xml file for
    > each db?
    > I use this code for write data:
    >
    > ...dataContext.registerNewObject(mycayennedataobject);
    > ...dataContext.commitChanges();
    >
    > ..so how cayenne know which database is the one that have the table
    > where write data?



    This archive was generated by hypermail 2.0.0 : Mon Feb 27 2006 - 08:09:46 EST