Heiko,
Ok, I nailed down the main offender - constraint error on ARTGROUP
table. Note that ARTGROUP has a reflexive relationship to itself. And
Firebird seems to be the only database out of all we work with that
will have referential integrity complaints when you run a query like
this: "DELETE FROM ARTGROUP". So there was nothing wrong with adapter,
but I had to tweak unit tests running raw SQL to prepare table data.
This is fixed now. But this unmasked a few other problems.
1. Performing any JDBC operation on tables or other DB objects that do
not exist results in OutOfMemoryError (yikes!) A few unit tests in
DataContextExtrasTst emulate exactly this condition. I would expect
some sort of SQLException, but OutOfMemory... Looks like a driver
problem. I haven't looked any deeper.
2. SelectQueryTst.testSelectLikeExactMatch fails. This particular unit
test is controversial (see postgresql discussions on this list 4-5
months ago), but it demonstrates that exact comparison of CHAR columns
is impossible due to space padding. On other databases workaround was
to strip padding (e.g. RTRIM(ARTIST_NAME) = 'xyz'). I am not sure how
to do this on Firebird. Does it even support string functions in SQL?
I've read somewhere that currently it does not, but I have no real
knowledge of Firebird and can't comment.
Heiko, can you comment on 1. and 2.?
Unrelated to current problems - there are a few functions that Firebird
support, but we need to test them or add to the adapter if it doesn't
work out of the box. Supporting them would be very nice for adapter
completeness:
a. Stored Procedures. Chances are that they'll work out of the box, but
setting up unit tests requires some effort. See
org.objectstyle.cayenne.unittest.SybaseDelegate (under tests source)
for a good example how to setup database-specific DDL for stored
procedures testing.
b. LOB. Support for LOBs may just work (e.g. Sybase) or may require
some serious customization (Oracle). This need to be tested.
Both a. and b. are excluded by default from the unit test procedure,
unless XYZDelegate instructs to include them.
BTW, a. and b. should be tried for DB2 adapter as well... Volunteers?
Andrus
On Saturday, August 30, 2003, at 12:13 PM, Andrus Adamchik wrote:
> Heiko,
>
> I installed Firebird on Linux and was able to connect to it from
> Cayenne. Unit test results are pretty much the same as yours (lots of
> failures :-)). But now that I have the test environment I can dig
> around and see what's wrong. I'll get back once I have some results.
>
> Andrus
This archive was generated by hypermail 2.0.0 : Sat Aug 30 2003 - 16:25:51 EDT