Apache JDO Project - Problem with self-referencing relationship

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > August 2005 > Problem with self-referencing relationship





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem with self-referencing relationship
Michael Bouschen

2005-07-21, 5:45 pm

Hi Erik, hi Andy,

when running the CompletenessTest I ran into a JDODataStoreException
saying that a column name is in more than one table in the FROM list. I
have the feeling it has to do with self-referencing relationships
(Employee<->Employee). In this case the table in the OUTER JOIN is the
same as the one in the FROM clause, so I think it needs an
identification variable. I filed a JIRA issue JDO-93 with more details
(configuration and stacktrace) for this.

Thanks!

Regards Michael
--
Michael Bouschen Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin

Craig Russell

2005-08-08, 5:45 pm

Andy Jefferson

2005-08-08, 5:45 pm

> Any update on this?

Not from me. Not had time to look at it. Don't know if Erik has.

Out of interest, how do I run this "CompletenessTest" on its own ? (since it's
not in alltests.conf). I've tried running "companyNoRelationships.conf",
which is fine for 1 run, but if I run it again it tries to insert the same
data again and causes duplicate key issues. Tests should be cleaning
themselves out so they leave the datastore in the same state as it was at
startup (IMHO).

--
Andy

Craig Russell

2005-08-08, 5:45 pm

Craig Russell

2005-08-08, 5:45 pm

Karan Malhi

2005-08-09, 2:45 am

Hi Craig,

I dont know anything about this "Completeness Test" . I do know that the tck
requirements is that the test should leave the database in a clean state. Is
this what the completeness test does (check to see if db is clean)? Where do
i look for this test? I heard you mentioning on the conference call that i
could run an individual test in maven, could you please tell me how to do
that? My fostore20 tests are all having errors? Is anybody else facing the
same problems with fostore20 (i hope its nothing to do with file permissions
or something-- but my guess is that should result in failures instead of
errors)

On 8/8/05, Craig Russell <Craig.Russell@sun.com> wrote:
>
> Hi Andy, Karan,
> On Aug 8, 2005, at 11:30 AM, Andy Jefferson wrote:
>
> Any update on this?
>
>
> Not from me. Not had time to look at it. Don't know if Erik has.
>
> Out of interest, how do I run this "CompletenessTest" on its own ? (since
> it's
> not in alltests.conf). I've tried running "companyNoRelationships.conf",
> which is fine for 1 run, but if I run it again it tries to insert the same
> data again and causes duplicate key issues. Tests should be cleaning
> themselves out so they leave the datastore in the same state as it was at
> startup (IMHO).
>
>
> I completely agree. Please file a JIRA on this issue. CompletenessTest
> didn't get the message about cleaning up after itself. ;-)
>
> Karan,
>
> This is probably a good way to learn about one of the main components of
> our O/R mapping test framework.
>
> Craig
>
>
> --
> Andy
>
>
> Craig Russell
>
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>
> 408 276-5638 mailto:Craig.Russell@sun.com <Craig.Russell@sun.com>
>
> P.S. A good JDO? O, Gasp!
>
>
>



--
Karan Malhi

Craig Russell

2005-08-09, 2:45 am

2005-08-09, 7:45 am

Not from me too. I'm VERY busy in my FULL time job. I will come back
later this week.

Erik Bengtson

> -----Original Message-----
> From: Andy Jefferson [mailto:andy@jpox.org]
> Sent: Monday, August 08, 2005 8:31 PM
> To: jdo-dev@db.apache.org
> Subject: Re: Problem with self-referencing relationship
>
>
> Not from me. Not had time to look at it. Don't know if Erik has.
>
> Out of interest, how do I run this "CompletenessTest" on its own ?

(since
> it's
> not in alltests.conf). I've tried running

"companyNoRelationships.conf",
> which is fine for 1 run, but if I run it again it tries to insert the

same
> data again and causes duplicate key issues. Tests should be cleaning
> themselves out so they leave the datastore in the same state as it was

at
> startup (IMHO).
>
> --
> Andy



Michael Watzek

2005-08-09, 8:45 pm

Hi Andy,

I can run "companyNoRelationships.conf" several times without
reinstalling the schema. The result is always the same:

"SQL Exception: Column name
'DATASTOREIDENTITY0.PERSONS.DATASTORE_IDENTITY' is in more than one
table in the FROM list."

This is JDO-93. I cannot reproduce JDO-116. Have there been any other
exceptions when you ran "companyNoRelationships.conf" the first time?

Regards,
Michael
>
>
> Not from me. Not had time to look at it. Don't know if Erik has.
>
> Out of interest, how do I run this "CompletenessTest" on its own ? (since it's
> not in alltests.conf). I've tried running "companyNoRelationships.conf",
> which is fine for 1 run, but if I run it again it tries to insert the same
> data again and causes duplicate key issues. Tests should be cleaning
> themselves out so they leave the datastore in the same state as it was at
> startup (IMHO).
>



--
-------------------------------------------------------------------
Michael Watzek Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------

Andy Jefferson

2005-08-09, 8:45 pm

> I can run "companyNoRelationships.conf" several times without
> reinstalling the schema. The result is always the same:


Hi Michael,

I get the same as you, today! but certainly didn't yesterday. Since I can't
reproduce it myself now, someone please just close the issue (JIRA-116) and
if I find what was causing it I'll re-raise it with clearer instructions :-)



On an unrelated note, can someone please add the following 2 lines to
"test/conf/logging.properties"

log4j.category.com.mchange.v2.c3p0=INFO, A1
log4j.category.com.mchange.v2.resourcepool=INFO, A1

These will mean that the message on the console :-
log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog).
log4j:WARN Please initialize the log4j system properly.

when running the TCK (coming from C3P0) will not appear.




--
Andy

Andy Jefferson

2005-08-10, 7:45 am

> > > Any update on this?[vbcol=seagreen]

Now had time, and is fixed in JPOX CVS - in tomorrows (11/08/2005) nightly
build. CompletenessTest passes for "companyNoRelationships.conf"

--
Andy

Craig Russell

2005-08-10, 5:45 pm

Michael Bouschen

2005-08-11, 5:45 pm

Hi Andy,

>
>
> Now had time, and is fixed in JPOX CVS - in tomorrows (11/08/2005) nightly
> build. CompletenessTest passes for "companyNoRelationships.conf"
>


great, it works!

I resolved and closed the corresponding JIRA issue JDO-93.

Regards Mchael
--
Michael Bouschen Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com