java - Entity groups -


I am using a bit with Google App Engine and the defect of the outline of the transaction is missing. I'm implementing it as well as I can, but I'm killing the only exception: Can not work on multiple unit groups in a single transaction. Both the elements were found ... I have read the documentation (), but I can not find what they are saying. Actually what I am trying to do:

I have a list of objects, I want to check if they are already in the database if they are, then I will check that If they are equal, if not, update the managed example. Otherwise I will continue the unit. In the loop of objects (objects have not been released yet), I use EntityMananger.find () to view the ID by ID, giving it an error around the second time.

I used to work with a spring / hibernate (JPA) or EJB3 environment and I have never seen it before. Does anyone give me a simple explanation why I can not find the same type of organization in the same transaction?

How to not search, but for a reason ...

unit group A simple concept is that the units in the app engine are ancestors, for example you can model books and authors.

Author: Name-> X, and Author: Name-> Wai has two organizations in the form of book The book is another type (only a logical group of things) Relationship between books and authors Can be seen as an ancestors-child relationship.

For example

Book: Name-> B1, B2 Writer: Name-> could be written from X, so you have accepted them:

Authors: Name-> X is a parent of both books: Name-> B1, B2 Similarly, Book: Name-> B3 Writer: Name-> Y has been written by and it is also the author's form You can model that relationship in: name-> Y Book is a parent: name-> B3

When you behave like books, you can do it on B1, B3 and B3 Not together Walk. As they participate in various ancestors-child relations, the relation of every ancestor's child is an entity group. You can "lock" only one unit group at a time.

Hope this clears things a bit.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -