Hi everbody,

We just discovered that Sybase (and Oracle), understand also the standard SQL outer-join syntax.
Since legacy Sybase Outer-Joins have several restrictions (that do not apply to ANSI outer joins) and deliver different results than the ANSI outer joins, I would like to know if it is possible to force the use of ANSI outer join syntax in OJB.
Is ther just a generic flag for doing this? Or do I have to override some Platform...Impl class?
What I would like to do is just to use the same outer-join syntax as it is generated for MySQL instead of using the Sybase legacy *= operators.


Thanks,
cheers
Danilo


I am answering my own post and adding a new question...

Ok, I got a lok at the Platform...Impl sources it seems very easy to do what I need. It is just necessary to extend the the PlatformSybaseASE or PlatformOracle9i classes and override the a method as follows:

public byte getJoinSyntaxType()
{
    return SQL92_NOPAREN_JOIN_SYNTAX;
}


Now, my new question is: do somebody knows of any drwabacks by using ANSI syntax instead of legacy syntax?

If there are no real huge performance drawbacks, shouldn't ANSI join syntax become the default implementation? This way the same PersistenceBroker queries would/should always return the same data set independently from the underlying database, this is not the case for legacy *outer* joins.
As proposal, it should maybe be possible to force the use of 'legacy' syntax directly on the Query object (yeah hardcore guys may want to set it independently on each join within the same query, but this would be quite complicated to manage and not very useful).
What about adding a method 'forceLegacyJoins()' on to the Query interface? On databases like MySQL this would have no effect, but on Sybase, Oracle and maybe other, could be very useful...


Thanks for comments/answers
bye
Danilo


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to