> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jason van Zyl
> Sent: Friday, November 24, 2000 9:08 AM
> To: 'Turbine'
> Subject: RE: [proposal] db schema/ Patch for SQL/Peer generation
>
>
> On Fri, 24 Nov 2000, Stefan Guenther wrote:
>
> > >
> > > >
> > > > * Should we hear the comments from that guy about Informix, and
> > > > use TB, TRB or TRBN as a prefix (object name lengths) instead
> > > > of TURBINE?
> > >
> > > How about the following:
> > > Torque could be changed to shorten the names of db-objects to
> > > a specified
> > > length.
> >
> > Also there was no reaction on this following this explanation is a
> > patch,which opens the possibility to get a shortened name
> for the database
> > objects. The process is controlled by an optional parameter '
> > maximumLength="18"' for the targets 'project-om' and
> 'project-sql' in
> > torque.xml.
> > The classes used in the generation process, expose a new property
> > "mangledName", which contains a shortened name. Using this
> property in the
> > templates will not change the generated code, if the
> property is not set in
> > the ant-target, or is set to a larger value as the longest
> table name (btw
> > it defaults to 32).
> > To get it completely working the templates have to be
> changed accordingly.
> > For the sql-templates this is no problem, because they are
> kept in distinct
> > directories for each db-system, so in this part, it could
> be done only for
> > informix. But it has also be done for the peer generation.
>
> I must have missed these messages. I will look at the patches
> more closely tomorrow. Sorry, but could you summarize the
> problem again. Is this Informix specific? I would just
> like to get a better understanding before I apply any
> patches. My mail has a mind of its own, it appears I
> missed this discussion. My apologies.
>
Well, the problem arises from the table scheme in the new security code,
which uses
names for database objects, which are longer than 18 chars. Versions of
Informix before Version 9
are restricted to 18 chars on db objects, which is, as of a discussion some
weeks ago on this list, correspondent to the ANSI specs.
Assuming, that the om part of the security system should be completely
generated by torque sometime in the future, I tried to add functionality to
shorten the names, generated from Torque, with the addition that the Java
class names keep its original form. With this functionality it should be
possible, to generate templates, which transparently shorten the names of db
objects if necessary.
But running into another problem with Informix, i have to look in the source
of the security-peer-objects, this leads me to the conclusion, that it is
not planned, to generate this part from templates. So the functionality i am
trying to add, is probably not necessary, because, for my own project I will
try to obey the "restrictions" of Informix ;-).
And that lead to the conclusion, that I must change Turbine source by hand
every time I use a new "version/release" with Informix, if the naming scheme
is not shortened through the turbine developement process...
Now to the other problem mentioned above, it seems as if Informix converts
all names for db objects to lower case and requires that queries contains
the names in lowercase.
This could be handled the same way as the name length problem, but keeps
theory as long as if it is not planned or it is not possible to generate the
om - part of the security system via torque. BTW I have seen this the other
way round on Interbase, but don't now whether Interbase requires the names
upper case in queries.
Hope this explains the topic enough to you Jason.
Stefan G�nther
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]