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

Joef Huang commented on OPENJPA-2541:
-------------------------------------

I tried to put together a test, but couldn't finish it outside our code base 
and data (both are confidential). Just a side question, once OpenJPA logs a 
database statement, does it always send it to the database server for 
execution, or does it look in the level 1/2 cache first (which means even when 
a statement shows up in the log, it may not actually be sent to the database 
server if the result is found in cache).

> Undesired "update" statement fired when loading related entities
> ----------------------------------------------------------------
>
>                 Key: OPENJPA-2541
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2541
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa
>    Affects Versions: 2.0.0
>         Environment: Windows, AIX
>            Reporter: Joef Huang
>
> In orm.xml, we have an entity which refers to another entity in an 
> "one-to-many" relationship. 
> When eager loading the main entity, we saw JPA fired "update" statements 
> against the target entity table, which it shouldn't. 
> After switching to lazy loading with the target entity set to be read-only, 
> this problem no longer appears. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to