Hi Armin,

Just added the issue:

http://issues.apache.org/jira/browse/OJB-76

Thank you,

Sergey



-----Original Message-----
From: Armin Waibel [mailto:[EMAIL PROTECTED]
Sent: Monday, October 24, 2005 6:52 PM
To: OJB Users List
Subject: Re: bug in OJB?

Hi Sergey,

now I get your point, you are right this is a bug.
Your attached patch was removed by the apache-server (I don't get it),
please open an issue in jira
http://issues.apache.org/jira/browse/OJB
and add your patch. I will integrate it ASAP.

Thanks much!

regards,
Armin

Manukyan, Sergey wrote:
> Hi Armin,
>
> I am using OJB 1.0.3 and only used "link", didn't try "object". I made
a
> quick fix in MtoNBroker, that looks like it works for me now, please
see
> the attached file. And find it under "FIXED" comment,
>
> The example I gave is simplified from the real. But I think it gives
the
> idea where problem is-> OJB assumes that (M to N) table has only
> different fields for M key and N key when actually in my case both
keys
> are composite and some fields are common.
>
> M key: k1,m1
> N key: k1,n1
>
> So (M to N) table has only 3 keys: k1,m1,n1
> , not 4: k1,m1,k1,n1.
>
>
> If you still need a full descriptor let me know, and I will send it to
> you...
>
> Regards,
> Sergey
>
>
>
>
> -----Original Message-----
> From: Armin Waibel [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 24, 2005 1:09 PM
> To: OJB Users List
> Subject: Re: bug in OJB?
>
> Hi Sergey,
>
> which version of OJB do you use?
> Could you post the whole class-descriptor for MyClass and the m-side
> class.
> Is the wrong sql-statement only be generated with auto-update="link"
or
> for "object" too?
>
> regards,
> Armin
>
>
> Manukyan, Sergey wrote:
>
>>Folks,
>>
>>
>>
>>
>>When I have :
>>
>>
>>
>>
>><class-descriptor class="com.lear.app.sqs.beans.MyClass">
>>
>>...
>>
>><collection-descriptor name="allUsers"
>>
>>
>>
>>
>
>
collection-class="org.apache.ojb.broker.util.collections.ManageableArray
>
>>List"
>>
>>
>>
>>element-class-ref="com.lear.app.sqs.beans.MyUser"
>>
>>
>>                        auto-update="link"
>>
>>
>>                        indirection-table="CLASS">
>>
>>
>>
>>
>>                        <fk-pointing-to-this-class column="SPUNIT" />
>>
>>                        <fk-pointing-to-this-class column="SPCLASS" />
>>
>>                      
>>
>>
>>                        <fk-pointing-to-element-class column="SPUNIT"
>
> />
>
>>                        <fk-pointing-to-element-class column="SPUSER"
>
> />
>
>>            </collection-descriptor>
>>
>></class-descriptor>
>>
>>
>>
>>
>>And then call create(myClass) on Persistent Broker, when storing link
>>for a collection it generates INSERT SQL with duplicated field SPUNIT
>
> ->
>
>>results in SQL exception:
>>
>>
>>
>>
>>[org.apache.ojb.broker.accesslayer.StatementsForClassImpl] ERROR:
>>[SQL0121] Duplicate name SPUNIT not allowed.
>>
>>
>>
>>
>>INSERT INTO CLASS (SPUNIT, SPCLASS, SPUNIT,SPUSER) VALUES (?,?,?,?)
>>
>>
>>
>>
>>Any workaround ideas?
>>
>>
>>
>>
>>Thank you,
>>
>>
>>
>>
>>Sergey
>>
>>
>>
>>
>>
>>
>>**********************
>>** LEGAL DISCLAIMER **
>>**********************
>>
>>This E-mail message and any attachments may contain
>>
>>legally privileged, confidential or proprietary
>>
>>information. If you are not the intended recipient(s),
>>or the employee or agent responsible for delivery of
>>
>>this message to the intended recipient(s), you are
>>
>>hereby notified that any dissemination, distribution
>>
>>or copying of this E-mail message is strictly
>>
>>prohibited. If you have received this message in
>>
>>error, please immediately notify the sender and
>>
>>delete this E-mail message from your computer.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**********************
** LEGAL DISCLAIMER **
**********************

This E-mail message and any attachments may contain
legally privileged, confidential or proprietary
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of
this message to the intended recipient(s), you are
hereby notified that any dissemination, distribution
or copying of this E-mail message is strictly
prohibited. If you have received this message in
error, please immediately notify the sender and
delete this E-mail message from your computer.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to