Re: AW: [Objectbridge-developers] AW: [Fwd: ObjectBridge with Oracle]
Brought to you by:
thma
From: Dirk O. <di...@xa...> - 2001-08-16 19:01:00
|
Mahler Thomas wrote: > > ... just a sidenote from my experiences using OJB with FrontBase: > > > > 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 > > SqlGenerator > > that the framework would use in conjunction with my database. > > In general I think it's good to this kind of flexibility. > On the other hand I'd like to have the SqlGenerator as generic as possible > to cope with most RDBMS. While I appreciate a generic SqlGenerator, I would expect that with a rising number of supported DBMS one will end up in designing an API for dealing with SQL special to a specific DB server. I wouldn't complicate things unnecessarily, so let's wait until we really need to implement custom subclasses of SqlGenerator. > > 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 > > 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. FrontBase claims to be very strictly conforming to the SQL standard. I found lots of SQL scripts that worked perfectly on other DBMS to be broken on FrontBase because of their strictness... But apart from this, it's a very fine, full-featured but lightweight DBMS. > 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. [...] > In the repository you will need: > <ClassDescriptor id="1"> > <class.name>MyClass</class.name> > <table.name>MYTABLE</table.name> > <FieldDescriptor id="1"> > <field.name>id</field.name> > <column.name>"ID"</column.name> [...] Sounds interesting. I'll give it a try! -dirk |