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 Armin Waibel <ar...@code-au-lait.de> on 2003/10/31 19:10:41 UTC
Re: More 1:0..1 optional mapping trouble
Hi Edson,
could you write a test case/cases showing the problems?
Maybe you could use ReferenceTest in test suite as
starting point.
regards,
Armin
Edson Carlos Ericksson Richter wrote:
> Actually it's isn't doing a real insert, but is executing a SELECT
> SQ_anything.NEXTVAL from DUAL and doing a setId() in my object, but the
> database operation was a UPDATE. In the screen (in my app) appear that the
> object was inserted, because the Id was incremented.
> BTW, an Id was wasted due unnecessary .NEXTVAL...
>
> I think it's a bug, doesn't?
>
> Of couse, disabling just the "reference" portion of .XML file in main
> object, all came to expected.
>
> Edson Richter
>
>
> ----- Original Message -----
> From: Edson Carlos Ericksson Richter
> To: 'OJB Users List'
> Sent: Friday, October 31, 2003 3:43 PM
> Subject: More 1:0..1 optional mapping trouble
>
>
> Hi!
>
> Now, if I update an object that hasn't the 1:1 optional mapping, ojb is
> always inserting a new object!!!
>
> Presently there are two serious bugs in 1:1 optional mappings:
>
> 1) If using proxies, and the optional side is NULL, it don't return true if
> comparing (optional==null).
> 2) If not using proxies, and the optional side is NULL, OJB always does an
> insert of a new object.
>
> I will appreciate any tips,
>
> Edson Richter
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.534 / Virus Database: 329 - Release Date: 31/10/2003
>
>
> ---------------------------------------------------------------------
> 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: More 1:0..1 optional mapping trouble
Posted by Edson Carlos Ericksson Richter <ed...@mgrinformatica.com.br>.
I'll look at it, and send you as soon as I can... Actually, to avoid the
problem, I have changed my reference to a collection, that works fine.
May be next week I'll send you the code.
Thanks for your attention (again),
Edson Richter
----- Original Message -----
From: Armin Waibel
To: OJB Users List
Sent: Friday, October 31, 2003 3:10 PM
Subject: Re: More 1:0..1 optional mapping trouble
Hi Edson,
could you write a test case/cases showing the problems?
Maybe you could use ReferenceTest in test suite as
starting point.
regards,
Armin
Edson Carlos Ericksson Richter wrote:
> Actually it's isn't doing a real insert, but is executing a SELECT
> SQ_anything.NEXTVAL from DUAL and doing a setId() in my object, but the
> database operation was a UPDATE. In the screen (in my app) appear that the
> object was inserted, because the Id was incremented.
> BTW, an Id was wasted due unnecessary .NEXTVAL...
>
> I think it's a bug, doesn't?
>
> Of couse, disabling just the "reference" portion of .XML file in main
> object, all came to expected.
>
> Edson Richter
>
>
> ----- Original Message -----
> From: Edson Carlos Ericksson Richter
> To: 'OJB Users List'
> Sent: Friday, October 31, 2003 3:43 PM
> Subject: More 1:0..1 optional mapping trouble
>
>
> Hi!
>
> Now, if I update an object that hasn't the 1:1 optional mapping, ojb is
> always inserting a new object!!!
>
> Presently there are two serious bugs in 1:1 optional mappings:
>
> 1) If using proxies, and the optional side is NULL, it don't return true
if
> comparing (optional==null).
> 2) If not using proxies, and the optional side is NULL, OJB always does an
> insert of a new object.
>
> I will appreciate any tips,
>
> Edson Richter
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.534 / Virus Database: 329 - Release Date: 31/10/2003
>
>
> ---------------------------------------------------------------------
> 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
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.534 / Virus Database: 329 - Release Date: 31/10/2003
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org