I wonder if this is related to the following bug I reported as 
https://issues.apache.org/jira/browse/OPENJPA-2311
I could work around my bug by making the order column nullable 
@OrderColumn(nullable = true). Perhaps it helps in your case as well.

Henno

-----Oorspronkelijk bericht-----
Van: Rick Curtis [mailto:[email protected]] 
Verzonden: vrijdag 18 juli 2014 14:43
Aan: [email protected]; [email protected]
Onderwerp: Re: bug in openjpa with ordercolumn and mapped by

Michael -

I browsed through your previous post and it certainly looks like a bug.
Please go ahead and open a JIRA.  If you're feeling particularly courageous, 
you could always try to format your github project into a 'proper' OpenJPA 
junit test[1]. I'm not going to promise that I'll get time to look at it in the 
coming days, but getting a JIRA opened will get things rolling in the right 
direction.

Thanks,
Rick

[1] http://openjpa.apache.org/writing-test-cases-for-openjpa.html


On Fri, Jul 18, 2014 at 4:50 AM, Michael Wiles <[email protected]>
wrote:

> So I've found some behaviour I didn't expect.
>
> If I use orderColumn  on a one to many it works fine. I see the order 
> column being updated. This is for a uni directional relationship.
>
> If I however add a mappedBy to make it bidirectional the order column 
> no longer gets updated.
>
> I assume there's no other reason by bidirectional relationships and 
> order column shouldn't work. If I try it with another jpa provider it 
> does work (Eclipselink).
>
> I have created a github project to demonstrate...
>
> see https://github.com/michaelwiles/OpenJpaBugs
>
> --
> see my blog:
> http://analysis102.blogspot.com
> http://audiblethoughts.blogspot.com
> http://outsideofficehours.blogspot.com
>



--
*Rick Curtis*

Reply via email to