Re: AW: AW: AW: [Objectbridge-developers] generating mapping files an d da taba ses
Brought to you by:
thma
From: Ivan T. <to...@cr...> - 2001-08-24 10:48:23
|
On Fri, 2001-08-24 at 12:47, Mahler Thomas wrote: > Hi again, >=20 > > -----Urspr=FCngliche Nachricht----- > > Von: Ivan Toshkov [mailto:to...@cr...] > > Gesendet: Donnerstag, 23. August 2001 17:14 > > An: Mahler Thomas > > Cc: 'Lasse Lindg=E5rd'; obj...@li... > > Betreff: Re: AW: AW: [Objectbridge-developers] generating=20 > > mapping files > > and da taba ses > >=20 > >=20 > > On Thu, 2001-08-23 at 16:40, Mahler Thomas wrote: > > > > Unfortunately, there isn't quite enough data in the=20 > > > > repository.xml file > > > > to generate the correct SQL statements. So far, I don't=20 > > know when to > > > > generate 'NOT NULL' and the size of VARCHAR objects. > > > >=20 > > > > So, perhaps we should add this data to the XML? > > > >=20 > > >=20 > > > Yes I have been thinking in this direction too. > >=20 > > Ok, I've added the following two attributes to jdbc_type:=20 > > 'not-null' and > > 'size'. The problem is that (even in the test repository) many tables > > are described in several places each, which can lead to inconsitency. > > So, what do you think of the following form? > >=20 > > <MappingRepository> > > <JdbcConnectionDescriptor id=3D"default"> > > ... > > </JdbcConnectionDescriptor> > > <JdbcConnectionDescriptor id=3D"other"> > > ... > > </JdbcConnectionDescriptor> > > ... >=20 > I like this idea to keep the JdbcConnectionDescriptors out of the > ClassDescriptors! >=20 > > <TableDescriptor name=3D"table_name" id=3D"tableId" > > [jdbc-ref=3D"other"]> > > <ColumnDescriptor name=3D"columnName" [primaryKey=3D"yes|no"] > > [not-null=3D"yes|no"] .../> > > </TableDescriptor> > > ... >=20 > it's also good to have tables separately described from classes, as sever= al > classes may be mapped to the same table! > I think we need some more information for jdbc_type, as size works only f= or > CHAR(X) and VARCHAR(Y), but there are also things like DECIMAL(6,2) or > NUMERIC(3,8) allowed in SQL ! > Well, this may not be the best solution, but size=3D"3, 8" could do the trick. Of course, if there is more information needed, we should put it. > Maybe it's also a good idea to have a switch [indexed=3D"yes|no"]. This w= ould > allow to generate indexes on certain columns that are used in where claus= es. >=20 Sure! |