openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2519) fetchType.lazy and persisting one-to-one relations
Date Thu, 24 Jul 2014 16:48:39 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14073370#comment-14073370
] 

Rick Curtis commented on OPENJPA-2519:
--------------------------------------

Thanks for the update.

My guess as to what is going on is that when OpenJPA is merging data it is only merges fields
that were loaded prior to detachment. Can you try to load the lazy relationship via traversal(rather
than changing Lazy->Eager) to see if it resolves the issue. The other thing to try (which
I don't think will work) is to ensure that your relationship has CascadeMerge set on it.

I don't have time this afternoon to dig into this problem, but I'll take a look tomorrow morning.
I'm pretty sure there is some way to configure this to work as you want.

> fetchType.lazy and persisting one-to-one relations
> --------------------------------------------------
>
>                 Key: OPENJPA-2519
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2519
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 2.2.0
>            Reporter: Marc Logemann
>
> Hi,
> i have an entity which has a mapped superclass. In that superclass i have a 1:1 relation
which is marked "lazy". 
> Now when i load that entity, attach an object to that relation and persist it, the change
is not reflected in the database. But the jpaversion is increased. Also all other "normal"
mapped fields are persisted but not the Lazy 1:1. Of course i checked the object right before
persist and it looks pretty perfect. 
> If i remove the lazy attribute from the annotation. Everything works like expected. When
looking at OPENJPA-2505 and this issue, i am really concerned about your FetchType implementation.
This definitely feels buggy.
> And to make things more weird: On my MySQL box, the bug is non-existant. As soon as i
deploy the application (really the very same application) to MariaDB, its there.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message