You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Adriano Crestani <ad...@gmail.com> on 2007/04/04 07:55:59 UTC
DAS Java Convention Over Configuration question
I was wondering why the "id" field being mapped as a table PK is defined as
"Convention Over Configuration". Because in java it is possible to retrieve
the table PK only using java.sql.DatabaseMetaData.getPrimaryKeys(String
catalog, String schema, String table) method.
Does the "id" Convention Over Configuration exist only because some DBMS
does not support the java.sql.DatabaseMetaData.getPrimaryKeys(String
catalog, String schema, String table) method?
Adriano Crestani
Re: DAS Java Convention Over Configuration question
Posted by Kevin Williams <ke...@qwest.net>.
All convention info should probably be added to the RDB DAS User's
Guide:
http://wiki.apache.org/ws/Tuscany/TuscanyJava/DAS_Java_Overview/RDBDAS_Java_User_Guide
Thanks,
--Kevin
haleh mahbod wrote:
> Hi Adriano,
> It would be good to document any conventions that others need to know
> about
> also on this page.
> http://cwiki.apache.org/TUSCANY/das-java-project.html
>
> Thanks,
> Haleh
>
> On 4/6/07, Adriano Crestani <ad...@gmail.com> wrote:
>
>>
>> Just to be sure: Is the Convetion Over Configuration over "id" and
>> "xxx_id"
>> columns, more specifically the "id" keyword, case sensitive?
>>
>> Adriano Crestani
>>
>> On 4/5/07, Adriano Crestani <ad...@gmail.com> wrote:
>> >
>> > Thanks Kelvin ; )(again)
>> >
>> > Adriano Crestani
>> >
>> > On 4/4/07, Kevin Williams <ke...@qwest.net> wrote:
>> > >
>> > > Hello Adriano,
>> > >
>> > > This use of convention is actually for the "write" side of
>> things. A
>> PK
>> > >
>> > > is needed to generate correct update commands based on the SDO
>> Change
>> > > Summary. In the absence of a defined PK, the DAS will assume any
>> column
>> > > named ID is the PK and use that in the generated statement.
>> > >
>> > > Also, we have tried to avoid dependence on Database Schema metadata
>> for
>> > > information such as PKs and FKs. The reason for this is that
>> they are
>> > > sometimes not defined in the database.
>> > >
>> > > Thanks,
>> > >
>> > > --Kevin
>> > >
>> > >
>> > > Adriano Crestani wrote:
>> > >
>> > > > I was wondering why the "id" field being mapped as a table PK is
>> > > > defined as
>> > > > "Convention Over Configuration". Because in java it is possible to
>> > > > retrieve
>> > > > the table PK only using java.sql.DatabaseMetaData.getPrimaryKeys
>> > > (String
>> > > > catalog, String schema, String table) method.
>> > > >
>> > > > Does the "id" Convention Over Configuration exist only because
>> some
>> > > DBMS
>> > > > does not support the
>> java.sql.DatabaseMetaData.getPrimaryKeys(String
>> > > > catalog, String schema, String table) method?
>> > > >
>> > > > Adriano Crestani
>> > > >
>> > >
>> > >
>> > >
>> > >
>> ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>> > >
>> > >
>> >
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: DAS Java Convention Over Configuration question
Posted by haleh mahbod <hm...@gmail.com>.
Hi Adriano,
It would be good to document any conventions that others need to know about
also on this page.
http://cwiki.apache.org/TUSCANY/das-java-project.html
Thanks,
Haleh
On 4/6/07, Adriano Crestani <ad...@gmail.com> wrote:
>
> Just to be sure: Is the Convetion Over Configuration over "id" and
> "xxx_id"
> columns, more specifically the "id" keyword, case sensitive?
>
> Adriano Crestani
>
> On 4/5/07, Adriano Crestani <ad...@gmail.com> wrote:
> >
> > Thanks Kelvin ; )(again)
> >
> > Adriano Crestani
> >
> > On 4/4/07, Kevin Williams <ke...@qwest.net> wrote:
> > >
> > > Hello Adriano,
> > >
> > > This use of convention is actually for the "write" side of things. A
> PK
> > >
> > > is needed to generate correct update commands based on the SDO Change
> > > Summary. In the absence of a defined PK, the DAS will assume any
> column
> > > named ID is the PK and use that in the generated statement.
> > >
> > > Also, we have tried to avoid dependence on Database Schema metadata
> for
> > > information such as PKs and FKs. The reason for this is that they are
> > > sometimes not defined in the database.
> > >
> > > Thanks,
> > >
> > > --Kevin
> > >
> > >
> > > Adriano Crestani wrote:
> > >
> > > > I was wondering why the "id" field being mapped as a table PK is
> > > > defined as
> > > > "Convention Over Configuration". Because in java it is possible to
> > > > retrieve
> > > > the table PK only using java.sql.DatabaseMetaData.getPrimaryKeys
> > > (String
> > > > catalog, String schema, String table) method.
> > > >
> > > > Does the "id" Convention Over Configuration exist only because some
> > > DBMS
> > > > does not support the java.sql.DatabaseMetaData.getPrimaryKeys(String
> > > > catalog, String schema, String table) method?
> > > >
> > > > Adriano Crestani
> > > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >
> > >
> >
>
Re: DAS Java Convention Over Configuration question
Posted by Adriano Crestani <ad...@gmail.com>.
Just to be sure: Is the Convetion Over Configuration over "id" and "xxx_id"
columns, more specifically the "id" keyword, case sensitive?
Adriano Crestani
On 4/5/07, Adriano Crestani <ad...@gmail.com> wrote:
>
> Thanks Kelvin ; )(again)
>
> Adriano Crestani
>
> On 4/4/07, Kevin Williams <ke...@qwest.net> wrote:
> >
> > Hello Adriano,
> >
> > This use of convention is actually for the "write" side of things. A PK
> >
> > is needed to generate correct update commands based on the SDO Change
> > Summary. In the absence of a defined PK, the DAS will assume any column
> > named ID is the PK and use that in the generated statement.
> >
> > Also, we have tried to avoid dependence on Database Schema metadata for
> > information such as PKs and FKs. The reason for this is that they are
> > sometimes not defined in the database.
> >
> > Thanks,
> >
> > --Kevin
> >
> >
> > Adriano Crestani wrote:
> >
> > > I was wondering why the "id" field being mapped as a table PK is
> > > defined as
> > > "Convention Over Configuration". Because in java it is possible to
> > > retrieve
> > > the table PK only using java.sql.DatabaseMetaData.getPrimaryKeys
> > (String
> > > catalog, String schema, String table) method.
> > >
> > > Does the "id" Convention Over Configuration exist only because some
> > DBMS
> > > does not support the java.sql.DatabaseMetaData.getPrimaryKeys(String
> > > catalog, String schema, String table) method?
> > >
> > > Adriano Crestani
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>
Re: DAS Java Convention Over Configuration question
Posted by Adriano Crestani <ad...@gmail.com>.
Thanks Kelvin ; )(again)
Adriano Crestani
On 4/4/07, Kevin Williams <ke...@qwest.net> wrote:
>
> Hello Adriano,
>
> This use of convention is actually for the "write" side of things. A PK
> is needed to generate correct update commands based on the SDO Change
> Summary. In the absence of a defined PK, the DAS will assume any column
> named ID is the PK and use that in the generated statement.
>
> Also, we have tried to avoid dependence on Database Schema metadata for
> information such as PKs and FKs. The reason for this is that they are
> sometimes not defined in the database.
>
> Thanks,
>
> --Kevin
>
>
> Adriano Crestani wrote:
>
> > I was wondering why the "id" field being mapped as a table PK is
> > defined as
> > "Convention Over Configuration". Because in java it is possible to
> > retrieve
> > the table PK only using java.sql.DatabaseMetaData.getPrimaryKeys(String
> > catalog, String schema, String table) method.
> >
> > Does the "id" Convention Over Configuration exist only because some DBMS
> > does not support the java.sql.DatabaseMetaData.getPrimaryKeys(String
> > catalog, String schema, String table) method?
> >
> > Adriano Crestani
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>
Re: DAS Java Convention Over Configuration question
Posted by Kevin Williams <ke...@qwest.net>.
Hello Adriano,
This use of convention is actually for the "write" side of things. A PK
is needed to generate correct update commands based on the SDO Change
Summary. In the absence of a defined PK, the DAS will assume any column
named ID is the PK and use that in the generated statement.
Also, we have tried to avoid dependence on Database Schema metadata for
information such as PKs and FKs. The reason for this is that they are
sometimes not defined in the database.
Thanks,
--Kevin
Adriano Crestani wrote:
> I was wondering why the "id" field being mapped as a table PK is
> defined as
> "Convention Over Configuration". Because in java it is possible to
> retrieve
> the table PK only using java.sql.DatabaseMetaData.getPrimaryKeys(String
> catalog, String schema, String table) method.
>
> Does the "id" Convention Over Configuration exist only because some DBMS
> does not support the java.sql.DatabaseMetaData.getPrimaryKeys(String
> catalog, String schema, String table) method?
>
> Adriano Crestani
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org