Re: AW: AW: [Objectbridge-developers] generating mapping files and da taba ses
Brought to you by:
thma
|
From: Ivan T. <to...@cr...> - 2001-08-23 15:14:16
|
On Thu, 2001-08-23 at 16:40, Mahler Thomas wrote:
> > Unfortunately, there isn't quite enough data in the
> > repository.xml file
> > to generate the correct SQL statements. So far, I don't know when to
> > generate 'NOT NULL' and the size of VARCHAR objects.
> >
> > So, perhaps we should add this data to the XML?
> >
>
> Yes I have been thinking in this direction too.
Ok, I've added the following two attributes to jdbc_type: '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?
<MappingRepository>
<JdbcConnectionDescriptor id="default">
...
</JdbcConnectionDescriptor>
<JdbcConnectionDescriptor id="other">
...
</JdbcConnectionDescriptor>
...
<TableDescriptor name="table_name" id="tableId"
[jdbc-ref="other"]>
<ColumnDescriptor name="columnName" [primaryKey="yes|no"]
[not-null="yes|no"] .../>
</TableDescriptor>
...
<ClassDescriptor [table-ref="tableId"]>
...
<FieldDescriptor [column-name="columnName"]>
...
</FieldDescriptor>
</ClassDescriptor>
</MappingRepository>
|