surinder-insonix / datanucleus-appengine

Automatically exported from code.google.com/p/datanucleus-appengine
0 stars 0 forks source link

NontransactionalWrite = true doesn't allow the creation of two root entities with one EntityManager #183

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Create a "Hello, World" example with a simple JPA data class, 
persistence.xml config that sets NontransactionalWrite to true, and a 
servlet that creates and persists two entities of the class with no entity 
group ancestor.

2. Compile and run, and visit the URL of the servlet.

-- Full example attached.  Unpack in an empty dir, edit build.xml with a 
path to the 1.3.0 SDK, "ant runserver", then visit 
http://localhost:8080/clock .

What is the expected output? What do you see instead?

Expected: The servlet creates two root entities.

Actual: java.lang.IllegalArgumentException: can't operate on multiple entity 
groups in a single transaction. found both Element {
  type: "Book"
  id: 1
}
 and Element {
  type: "Book"
  id: 2
}

What version of the product are you using? On what operating system?

1.3.0 running in the development server, built with Ant.  Mac OS X 10.6.2 
(Java 6).

Original issue reported on code.google.com by dansande...@google.com on 5 Jan 2010 at 11:23

Attachments:

GoogleCodeExporter commented 8 years ago
SVN trunk does such things no problem. No changes made in code, simply ran the 
provided test

Original comment by googleco...@yahoo.co.uk on 20 Jul 2011 at 5:57