Menu

#51 DatabaseSequenceFilter: qualified table names not supported

v2.0
closed-fixed
None
5
2008-11-10
2004-04-21
No

I've been using DatabaseSequenceFilter on PostgreSQL
and have ported the schema to Oracle 9i. I am
finding that the DatabaseSequenceFilter is simply
returning an unsorted list of tables (i.e. they
are alphabetically sorted) on Oracle (but not
PostgreSQL).

I am using DBUnit 2.0 and an underlying
DataSource from the most recent drivers I can find
(9.2.0.3). I have qualified table names turned on
and I am referring to a specific Oracle schema by
passing a String to the DBUnit DataSource
constructor.

I will post a followup if I can work out why this
is happening...

Discussion

  • Anonymous

    Anonymous - 2004-04-21

    Logged In: YES
    user_id=430102

    I have been able to reproduce the behaviour on PostgreSQL
    by placing the tables in a new schema. (Previously I had
    been using the default 'public' schema).

    One source code download later and I've found the
    comment 'TODO : add support for qualified table names' :)

    If I get time, I'll see if I can add this feature

     
  • Manuel Laflamme

    Manuel Laflamme - 2004-04-22
    • milestone: --> v2.0
    • assigned_to: nobody --> mlaflamm
    • summary: DatabaseSequenceFilter no-op on Oracle 9.2.0.4 --> DatabaseSequenceFilter: qualified table names not supported
    • status: open --> open-fixed
     
  • Manuel Laflamme

    Manuel Laflamme - 2004-04-22

    Logged In: YES
    user_id=466344

    I just committed "qualified table names" support in CVS
    repository. Let me know if this is solving your problem.

    BTW, you don't usually need to use qualified names if you are
    passing the schema name to DbUnit connection constructor.
    The "qualified table names" feature is mainly useful when you
    need to tests against more than one schema at a time.

     
  • Anonymous

    Anonymous - 2004-04-22

    Logged In: YES
    user_id=430102

    Thanks for the quick response - I made a very similar
    modification to my local copy last night.

    However, taking the same tables and filtering both with
    and without specifying a schema still gives different
    results.
    I used the new CVS version to export tables to flat XML
    and when loading the XML
    I get foreign key violations only when a schema is
    specified. Unfortunately on Oracle I have to specify a
    schema so that I can avoid the system tables.

    I will work on creating a unit test which illustrates the
    problem.

     
  • Manuel Laflamme

    Manuel Laflamme - 2004-04-24

    Logged In: YES
    user_id=466344

    If you specify a schema to DbUnit connection, no operation
    will occurs on tables from the other schemas. Try to use a
    JDBC connection that has only access to schemas you want
    to work with instead.

     
  • Manuel Laflamme

    Manuel Laflamme - 2004-05-08

    Logged In: YES
    user_id=466344

    I fixed a serious flaw in DatabaseSequenceFilte introduced
    when adding cyclic dependencies detection in March. I
    suggest you to try the latest revision (1.8).

     
  • Manuel Laflamme

    Manuel Laflamme - 2004-05-12

    Logged In: YES
    user_id=466344

    had to rollback to DbUnit 2.0 revision because of multiple
    problems with later revisions. This means no more cyclic
    dependencies detection and no "qualified table name" feature
    support for now. I expect this to be temporary. Sorry about
    that.

     
  • Anonymous

    Anonymous - 2004-05-12

    Logged In: YES
    user_id=430102

    No problem - Thank you for your efforts and the
    information. (Unfortunately I've had too little time to
    work on a patch.)

     
  • Klaus Kneupner

    Klaus Kneupner - 2006-01-23

    Logged In: YES
    user_id=1434076

    This bug seems still to be existing. I realized that the
    DatabaseSequenceFilter is not working when the
    qualifiedTables Option is enabled for the
    DatabaseConfig-Object like:
    config.setFeature("http://www.dbunit.org/features/qualifiedTableNames",
    true);

     
  • matthias g

    matthias g - 2008-10-26

    Should be resolved with the commit I did for fixing #1531883 (svn rev. 843/trunk). Now the TablesDependencyHelper is used to resolve the dependencies which implicitly uses qualified table names support.

    If this does still not work please provide an according test case.

    Thanks and regards,
    mat

     
  • matthias g

    matthias g - 2008-10-26
    • status: open-fixed --> pending-fixed
     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

MongoDB Logo MongoDB