Hi Martin,
> Armin, can you try to apply OJB269 (that is change > src/schema/ojbtest-schema.xml /database/[EMAIL PROTECTED]'BLOB_TEST'] column > BLOB_VALUE_ to "BLOB" and CLOB_VALUE_ to "CLOB") and run BlobTest with > updated profiles for sapDB/maxDB (both previously indicated as failing > by you if applying OJB269). > > If it's still failing someone might perhaps look into tweaking OJB's > platform implementation for supporting the new DDL on sapDB/maxDB? (See > type mappings below, I don't know sapDB well enough to tell if there's > any significant differences.)
I made the changes you mentioned. The problem now is a wrong mapping for sapdb in torque-3.0.2.jar/sql/base/sapdb/dp.props file. As sapdb does not support BLOB/CLOB the mapping is
...
BLOB = LONG BYTE
CLOB = LONG UNICODE
<failure>
insert-sql:
[torque-sql-exec] Our new url -> jdbc:sapdb://localhost/OJB
[torque-sql-exec] Executing file: E:\dev\OJB_10~1.X\db-ojb\target\test\sql\ojbtest-schema.sql
[torque-sql-exec] Failed to execute: CREATE TABLE BLOB_TEST ( ID INTEGER NOT NULL, BLOB_VALUE_ LONG BYTE, CLOB_VALUE_ LONG UNICODE )
</failure>
to make the creation of the DB table possible it needs ... BLOB = LONG BYTE CLOB = LONG VARCHAR because LONG UNICODE is not supported in sapdb.
If I patch the torque jar the blob test run without problems.
So I suggest to patch the torque jar file (and add a note in the release-notes) to enable best support for all used databases.
What do you think?
regards, Armin
Martin Kal�n wrote:
I must have been suffering from amnesia earlier tonight since I was confused over an issue I have already resolved before. :)
The CLOB/BLOB issue is here: http://issues.apache.org/scarab/issues/id/OJB269
See also Armin's answer why this was not applied in CVS and my comment to this:
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=7962
I'm no longer sure my comment applies but I still think it does make sence to run a _Blob_Test using BLOB. :)
As it turns out Oracle is the platform with correct Torque mapping: BLOB = BLOB CLOB = CLOB
To see how Torque will map, check out lib/torque-3.0.2.jar!/sql/base/{$torque.database}/db.props
I think the bug is actually in OJB's profile-files that come from an old version of Torque. In the profile it should be property *torque.database* set under "TARGET DATABASE", not database only as in most OJB profiles in CVS.
Armin, can you try to apply OJB269 (that is change src/schema/ojbtest-schema.xml /database/[EMAIL PROTECTED]'BLOB_TEST'] column BLOB_VALUE_ to "BLOB" and CLOB_VALUE_ to "CLOB") and run BlobTest with updated profiles for sapDB/maxDB (both previously indicated as failing by you if applying OJB269).
If it's still failing someone might perhaps look into tweaking OJB's platform implementation for supporting the new DDL on sapDB/maxDB? (See type mappings below, I don't know sapDB well enough to tell if there's any significant differences.)
Hopefully we can find a permutation of {profile database, schema-xml datatypes, platform implementation/JDBC type mappings} that works for all databases -- knock on wood.
Some Torque mappings 3.0.2 for comparison: oracle ------ LONGVARCHAR = VARCHAR2 (2000) LONGVARBINARY = LONG RAW BLOB = BLOB CLOB = CLOB
sapdb ----- LONGVARCHAR = LONG VARCHAR LONGVARBINARY = LONG BYTE BLOB = LONG BYTE CLOB = LONG UNICODE
Good night, Martin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
