commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin van den Bemt <mll...@mvdb.net>
Subject [betwixt] strange behaviour with multimapping
Date Sat, 05 Nov 2005 14:16:36 GMT
Hi everyone,

We are using the betwixt multimapping in ddlutils but this gives some unexpected behaviour.
Let's assume this xml :

<database name="test">
   <index name="NotATable"/>
</database>

Let's assume this model :

Database -> Table -> Index

When reading this model we get a table named NotATable (index is not a child in anyway of
database, 
table is though)

I tried to isolate this issue in a test for betwixt, but didn't succeed very wel, but I committed
a 
test in ddlutils that shows this behaviour.

Below are all links to the files that may be necessary.

The test :

https://svn.apache.org/repos/asf/db/ddlutils/trunk/src/test/org/apache/ddlutils/io/TestDatabaseIO.java
(see the testmethod testFaultReadOfTable())

The mapping.xml :

https://svn.apache.org/repos/asf/db/ddlutils/trunk/src/java/mapping.xml

The DatabaseIO.java where the mapping is initialized :

https://svn.apache.org/repos/asf/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java

The only thing I could figure out is in
https://svn.apache.org/repos/asf/jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/io/read/ReadContext.java
On line 287 it tries to get the elementDescriptor for elementName index and in
https://svn.apache.org/repos/asf/jakarta/commons/proper/betwixt/trunk/src/java/org/apache/commons/betwixt/ElementDescriptor.java
it the qualifiedname seems to be null, which makes it return the elementdescriptor for table,

instead eg null and that way not processing that element at all.

Some changes in betwixt I tried didn't turn up anything (except for making the test that fails
pass, 
but the rest failing :)

Any help is appreciated...

Mvgr,
Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message