You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by St...@fws.gov on 2005/05/03 17:43:12 UTC
Is ODMG usable in 1.0.3?
I'm still having trouble with the collection stuff I asked about last
week, and now a new problem:
I use anonymous keys for essentially all of my references. With the
required-for-ODMG setting of auto-update="none", it appears that OJB never
sets the anonymous keys from the values in the referenced objects: It is
always inserting null into the FK column.
Should I just give up on 1.0.3, or am I missing something?
-steve
Steve Clark
ECOS Development Group
steve_clark@fws.gov
(970)226-9291
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Is ODMG usable in 1.0.3?
Posted by Armin Waibel <ar...@apache.org>.
Hi Steve,
Steve_Clark@fws.gov wrote:
> So many projects, so few brain cells.
>
> The problem with setting FK's is not in 1.0.3, it's in 1.0.0. Version
> problem on my end, and now I really have upgraded in this project.
> Mea maxima culpa.
>
no problem and remember the known bug with insert of new objects in 1:n
relations ;-)
Nevertheless I'm interested in all problems with odmg implementation, so
if you found an issue don't hesitate to write an bug report or send me
an test case.
> Last week's collection stuff still stands, though (Armin, did you get my
> test case?).
>
yep! Put this on my todo-list. Currently I'm working on inheritance
stuff, hope I find time to setup your test within the next few days.
regards,
Armin
> -steve
>
> Steve Clark
> ECOS Development Group
> steve_clark@fws.gov
> (970)226-9291
>
>
>
>
> Armin Waibel <ar...@apache.org>
> 05/03/2005 11:22 AM
> Please respond to
> "OJB Users List" <oj...@db.apache.org>
>
>
> To
> OJB Users List <oj...@db.apache.org>
> cc
>
> Subject
> Re: Is ODMG usable in 1.0.3?
>
>
>
>
>
>
> Hi Steve,
>
> Steve_Clark@fws.gov wrote:
>
>>I'm still having trouble with the collection stuff I asked about last
>>week, and now a new problem:
>>
>>I use anonymous keys for essentially all of my references.
>
>
> Do you use it for all 1:1 references or generally in all references?
>
>
>
>>With the
>>required-for-ODMG setting of auto-update="none", it appears that OJB
>
> never
>
>>sets the anonymous keys from the values in the referenced objects: It is
>
>
>>always inserting null into the FK column.
>>
>
>
> Are you sure that all anonymous keys be ignored or only these in
> conjunction with 1:n relations? If the FK wasn't anonymous the test pass?
> I ask because there is a bug in handling of new n-side objects of 1:n
> relations. The linking for new objects is not done. But this is
> independent of the field type (anonymous on/off).
>
> Please try to patch ObjectEnvelopeTable#cascadeInsertCollectionReferences
> in line 666 replace
>
> else
> {
> // we mark collection reference for linking
> oe.addLinkOneToN(col, source.getObject(), false);
> }
>
> with
>
> else
> {
> // we mark collection reference for linking
> oe.addLinkOneToN(col, source.getObject(), false);
> oe.setModificationState(oe.getModificationState().markDirty());
> }
>
> This should fix problems with new added objects in 1:n relations.
>
>
>
>>Should I just give up on 1.0.3, or am I missing something?
>>
>
>
> I'm strongly interested in fixing all issues in odmg. The problem is
> that I can only run against the OJB test-suite (all these tests pass for
> 1.0.3). Please report all issues to jira if possible with some kind of
> test case to reproduce the bug. I will try to fix this stuff till next
> release.
>
> regards,
> Armin
>
>
>
>>-steve
>>
>>Steve Clark
>>ECOS Development Group
>>steve_clark@fws.gov
>>(970)226-9291
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Is ODMG usable in 1.0.3?
Posted by St...@fws.gov.
So many projects, so few brain cells.
The problem with setting FK's is not in 1.0.3, it's in 1.0.0. Version
problem on my end, and now I really have upgraded in this project.
Mea maxima culpa.
Last week's collection stuff still stands, though (Armin, did you get my
test case?).
-steve
Steve Clark
ECOS Development Group
steve_clark@fws.gov
(970)226-9291
Armin Waibel <ar...@apache.org>
05/03/2005 11:22 AM
Please respond to
"OJB Users List" <oj...@db.apache.org>
To
OJB Users List <oj...@db.apache.org>
cc
Subject
Re: Is ODMG usable in 1.0.3?
Hi Steve,
Steve_Clark@fws.gov wrote:
> I'm still having trouble with the collection stuff I asked about last
> week, and now a new problem:
>
> I use anonymous keys for essentially all of my references.
Do you use it for all 1:1 references or generally in all references?
> With the
> required-for-ODMG setting of auto-update="none", it appears that OJB
never
> sets the anonymous keys from the values in the referenced objects: It is
> always inserting null into the FK column.
>
Are you sure that all anonymous keys be ignored or only these in
conjunction with 1:n relations? If the FK wasn't anonymous the test pass?
I ask because there is a bug in handling of new n-side objects of 1:n
relations. The linking for new objects is not done. But this is
independent of the field type (anonymous on/off).
Please try to patch ObjectEnvelopeTable#cascadeInsertCollectionReferences
in line 666 replace
else
{
// we mark collection reference for linking
oe.addLinkOneToN(col, source.getObject(), false);
}
with
else
{
// we mark collection reference for linking
oe.addLinkOneToN(col, source.getObject(), false);
oe.setModificationState(oe.getModificationState().markDirty());
}
This should fix problems with new added objects in 1:n relations.
> Should I just give up on 1.0.3, or am I missing something?
>
I'm strongly interested in fixing all issues in odmg. The problem is
that I can only run against the OJB test-suite (all these tests pass for
1.0.3). Please report all issues to jira if possible with some kind of
test case to reproduce the bug. I will try to fix this stuff till next
release.
regards,
Armin
> -steve
>
> Steve Clark
> ECOS Development Group
> steve_clark@fws.gov
> (970)226-9291
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Is ODMG usable in 1.0.3?
Posted by St...@fws.gov.
Armin,
Here's what we know so far about the anonymous key problems:
1:1 reference: Creating a new parent object and linking to an existing
child object, the FK is correctly set only if we call makePersistent() on
the parent object after the reference is established; if makePersistent()
is called before the reference is established, then the FK does not get
set::
// this case fails
tx.begin();
parent = new Parent();
db.makePersistent(parent);
child = findChild();
parent.setChild(child);
tx.commit();
// this case works
tx.begin();
parent = new Parent();
child = findChild();
parent.setChild(child);
db.makePersistent(parent);
tx.commit();
1:1 reference: Updating an existing parent object and linking to an
existing child object, the FK does not get set
m:n collection: Create a new parent object and link to a new child object,
the FK does not get set
Both cases: If we set auto-update="link", the FK is correctly set
(regardless of when makePersistent() is called in the 1:1 case)
We have not tested with non-anonymous keys
I will try the patch and see what happens, and will also try to get some
data on the non-anonymous key behavior.
thanks,
-steve
Steve Clark
ECOS Development Group
steve_clark@fws.gov
(970)226-9291
Armin Waibel <ar...@apache.org>
05/03/2005 11:22 AM
Please respond to
"OJB Users List" <oj...@db.apache.org>
To
OJB Users List <oj...@db.apache.org>
cc
Subject
Re: Is ODMG usable in 1.0.3?
Hi Steve,
Steve_Clark@fws.gov wrote:
> I'm still having trouble with the collection stuff I asked about last
> week, and now a new problem:
>
> I use anonymous keys for essentially all of my references.
Do you use it for all 1:1 references or generally in all references?
> With the
> required-for-ODMG setting of auto-update="none", it appears that OJB
never
> sets the anonymous keys from the values in the referenced objects: It is
> always inserting null into the FK column.
>
Are you sure that all anonymous keys be ignored or only these in
conjunction with 1:n relations? If the FK wasn't anonymous the test pass?
I ask because there is a bug in handling of new n-side objects of 1:n
relations. The linking for new objects is not done. But this is
independent of the field type (anonymous on/off).
Please try to patch ObjectEnvelopeTable#cascadeInsertCollectionReferences
in line 666 replace
else
{
// we mark collection reference for linking
oe.addLinkOneToN(col, source.getObject(), false);
}
with
else
{
// we mark collection reference for linking
oe.addLinkOneToN(col, source.getObject(), false);
oe.setModificationState(oe.getModificationState().markDirty());
}
This should fix problems with new added objects in 1:n relations.
> Should I just give up on 1.0.3, or am I missing something?
>
I'm strongly interested in fixing all issues in odmg. The problem is
that I can only run against the OJB test-suite (all these tests pass for
1.0.3). Please report all issues to jira if possible with some kind of
test case to reproduce the bug. I will try to fix this stuff till next
release.
regards,
Armin
> -steve
>
> Steve Clark
> ECOS Development Group
> steve_clark@fws.gov
> (970)226-9291
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Is ODMG usable in 1.0.3?
Posted by Armin Waibel <ar...@apache.org>.
Hi Steve,
Steve_Clark@fws.gov wrote:
> I'm still having trouble with the collection stuff I asked about last
> week, and now a new problem:
>
> I use anonymous keys for essentially all of my references.
Do you use it for all 1:1 references or generally in all references?
> With the
> required-for-ODMG setting of auto-update="none", it appears that OJB never
> sets the anonymous keys from the values in the referenced objects: It is
> always inserting null into the FK column.
>
Are you sure that all anonymous keys be ignored or only these in
conjunction with 1:n relations? If the FK wasn't anonymous the test pass?
I ask because there is a bug in handling of new n-side objects of 1:n
relations. The linking for new objects is not done. But this is
independent of the field type (anonymous on/off).
Please try to patch ObjectEnvelopeTable#cascadeInsertCollectionReferences
in line 666 replace
else
{
// we mark collection reference for linking
oe.addLinkOneToN(col, source.getObject(), false);
}
with
else
{
// we mark collection reference for linking
oe.addLinkOneToN(col, source.getObject(), false);
oe.setModificationState(oe.getModificationState().markDirty());
}
This should fix problems with new added objects in 1:n relations.
> Should I just give up on 1.0.3, or am I missing something?
>
I'm strongly interested in fixing all issues in odmg. The problem is
that I can only run against the OJB test-suite (all these tests pass for
1.0.3). Please report all issues to jira if possible with some kind of
test case to reproduce the bug. I will try to fix this stuff till next
release.
regards,
Armin
> -steve
>
> Steve Clark
> ECOS Development Group
> steve_clark@fws.gov
> (970)226-9291
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org