AW: [Objectbridge-developers] AW: [Fwd: ObjectBridge with Oracle]
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2001-08-16 07:12:48
|
Hallo Dirk > -----Urspr=FCngliche Nachricht----- > Von: Dirk Olmes [mailto:di...@xa...] > Gesendet: Mittwoch, 15. August 2001 20:49 > An: Mahler Thomas > Cc: 'Sa...@Ko...'; Objectbridge (E-Mail) > Betreff: Re: [Objectbridge-developers] AW: [Fwd: ObjectBridge with > Oracle] >=20 >=20 >=20 > > Hallo Sascha, > > =20 > > Thanks for you Code snippet.=20 > > I managed to get Oracle 8i and DB2 running on my machine.=20 > Now I am working on OJB=20 > > compatibility to DB2 and Oracle. This will > > include also the OJB internal database schema and all testcases. > > =20 > > I hope to get things finished this week ! >=20 > ... just a sidenote from my experiences using OJB with FrontBase: >=20 > I would love to have a mechanism to be able to control the way the > framework generates the SQL. All we need is basically there in the > SqlGenerator class. I would imagine a configuration parameter in the > mapping .xml file that allows me to specify the subclass of=20 > SqlGenerator > that the framework would use in conjunction with my database. In general I think it's good to this kind of flexibility.=20 On the other hand I'd like to have the SqlGenerator as generic as = possible to cope with most RDBMS. >=20 > This way I could have the framework do most of the work generating = SQL > for me and I'd just overwrite the methods that I need in order to = make > everything work with the database of my choice. In my special case it > was the method quote() which is currently disabled but had to=20 > be enabled > for my case. Are you sure you really need the quote method? I originally thought = this qouting of column names was required by SQL. but then I found that it = was only a common practise in my company to have these quotes. If you have such double quotes in DDL code the quotes will be part to = the column names. So I think it would be a solution to have the quotes = added in the repository.xml. For example in DDL you have=20 CREATE TABLE MYTABLE ( "ID" INT NOT NULL PRIMARY KEY, "VALUE" VARCHAR(50) ) In the repository you will need: <ClassDescriptor id=3D"1"> <class.name>MyClass</class.name> <table.name>MYTABLE</table.name> <FieldDescriptor id=3D"1"> <field.name>id</field.name> <column.name>"ID"</column.name> <jdbc_type>INTEGER</jdbc_type> <PrimaryKey>true</PrimaryKey> </FieldDescriptor> <FieldDescriptor id=3D"2"> <field.name>value</field.name> <column.name>"VALUE"</column.name> <jdbc_type>VARCHAR</jdbc_type> </FieldDescriptor> ... >=20 > -dirk >=20 |