Re: Fixing DbLoaderTst for Oracle

From: Holger Hoffstätte (holge..izards.de)
Date: Tue Feb 04 2003 - 17:12:00 EST

  • Next message: Holger Hoffstätte: "Re: Fixing DbLoaderTst for Oracle"

    Andrus Adamchik wrote:
    > On Sybase this is not the case. I am performing tests on schema "dbo" with
    > user "andrus".

    Oh well..it would have been too easy. ;)
    Isn't there any way to find out which schema a connection is using? sorry
    if this sounds dumb but I know next to nothing about JDBC internals.

    > The bottom line is that Cayenne does not support multiple DbEntities with
    > the same name in the same DataMap (even if they are in different schemas).

    IIRC EOModeler faces the same problem and uses the fully qualified name as
    internal table name; I think EOEntities with the same automagic name are
    automatically numbered. Maybe that would work? I just had a quick look,
    DataMap uses DbEntity.getName() as key and that can cause clashes, but if
    the name would rather be the schema.table FQDEN - just like a package
    namespace, what it really is - this could be avoided. Don't know how much
    this would affect the rest of the framework, but it probably wouldn't
    break anything - a unique lookup is still a unique lookup.
    The only theoretical thing that might suffer would be DataMap portability
    between DBs with and without schema support.

    > So maybe we should change the DbLoader to create multiple DataMaps - one
    > per schema?

    That's another possibility and probably less intrusive, only (?) affected
    methods would be loadDataMapFromDB() and its caller
    ImportDbAction.loadMap().
    No idea what would be better..maybe Craig or Andriy?

    Holger

    PS: hsqldb is really picky, more on that later :/



    This archive was generated by hypermail 2.0.0 : Tue Feb 04 2003 - 17:13:34 EST