Great to see that the code is working now.

DAS uses "Convention over configuration". Please see
[1]http://incubator.apache.org/tuscany/conventionoverconfiguration.html for
some details.

DAS creates / uses DataObjects which rely on uniqueness based on the Primary
Key. So all
 tables involved need to have PK. Now to make DAS know about the PKs, if the
column names are
 following the convention - i.e. if name is ID for a PK column, user does
not need to define <Table>
 in config.

Please see, from DAS svn codebase -
 [2]https://svn.apache.org/repos/asf/incubator/tuscany/java/das/rdb/src/test/
-

[2]CrudWithChangeHistory.testReadModifyApply4() - uses CustomerConfig.xml -
which does not
have <Table> defined.

But in case the convention is not followed, i.e. PK column name is something
else but not ID, user
needs to define  <Table> in config.

[2]Please see, AliasTests with config BooksConfigWithAlias.xml. Also, it is
not needed to specify
 all <Column>s in <Table>, but at lease the <Column> with PK should be
specified with attribute
 primaryKey="true" .

Also, in [1], there is convention described for relationships when parent
and child table have
columns ID and xxx_ID, and parent table name is xxx, then 1-n relationship
is assumed and it need
 not be specified in config. If this column naming convention is not
followed, then user will need to
 define explicit relationship in config.

[2]RelationshipTests - shows many examples of explicit relationships.
[2]ImpliedRelationshipTests - shows examples of implicit relationships.

Hope that you find these and other examples useful.

Regards,
Amita

On 8/30/07, Chu, Wing (Exchange) <[EMAIL PROTECTED]> wrote:
>
> Amita,
>
> Thanks very much! I did not define a table definition in the
> configuration file. Once I define it, the problem goes away.
>
> What's the guideline for including a table and relationship definition
> in the configuration file? Since I was only doing queries and is
> returning data (when all column is not null), I thought the
> ResultDescriptor in the command definition is sufficient.
>
> Regards,
> Wing
>
> -----Original Message-----
> From: Amita Vadhavkar [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 30, 2007 1:58 AM
> To: [email protected]
> Subject: Re: Having problem with null values in my DAS
>
> Will you please share the config file and the data/table info here, so I
> can
> simulate
> the condition. When tried with a simple sample, it seems that - when any
> other column
> other that the one mentioned in DAS as PK has null value, DAS is
> producing
> correct
> result. So, your details will help. Also, will you please see if the
> query
> is including PK
> in the SELECT clause.
>
> Regards,
> Amita
>
> On 8/30/07, Chu, Wing (Exchange) <[EMAIL PROTECTED]> wrote:
> >
> >  I am wondering if anyone came across this.
> >
> >
> >
> > I have a simple select A,B,C from TABLE1 where A=?
> >
> >
> >
> > I have no problem get the DataObject back when all the values are not
> > null.
> >
> >
> >
> > However, if any one of the value is null. I would get an object but
> the
> > values and the list is null.
> >
> >
> >
> > This seems not right to me. Is there a configuration that I miss?
> >
> >
> >
> > I am working with Oracle 10g
> >
> >
> >
> > Thanks,
> >
> > Wing
> >
> >
> >
> >
> ***********************************************************************
> > Bear Stearns is not responsible for any recommendation, solicitation,
> > offer or agreement or any information about any transaction, customer
> > account or account activity contained in this communication.
> >
> ***********************************************************************
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> ***********************************************************************
> Bear Stearns is not responsible for any recommendation, solicitation,
> offer or agreement or any information about any transaction, customer
> account or account activity contained in this communication.
> ***********************************************************************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to