Subhash, You may want to use JDO if that is possible. It appears that you can read uncommitted data within the same transaction, I presume because the Entity does not get fetched from the Datastore every time you use PersisistenceManager.getObjectById().
The same may be applicable to JPA. On Aug 31, 10:20 pm, Vikas Hazrati <[email protected]> wrote: > That sounds right, the data only becomes available to you once you > have committed the tx. From the docs > > "This consistent snapshot view also extends to reads after writes > inside transactions. Unlike with most databases, queries and gets > inside a datastore transaction do not see the results of previous > writes inside that transaction. Specifically, if an entity is modified > or deleted within a transaction, a query or get will return the > original version of the entity as of the beginning of the transaction, > or nothing if the entity did not exist then." > > On Aug 31, 8:19 am, Didier Durand <[email protected]> wrote: > > > > > Hi Subhash, > > > To my knowledge you can't do it: > > seehttp://code.google.com/appengine/articles/transaction_isolation.html > > for all details. > > didier > > > On Aug 30, 9:15 am, Subhash <[email protected]> wrote: > > > > Hi, > > > > Now I am using GAE for my application datastore. Before it, I was > > > using MySQL for my application database. In MySQL, we can fetch > > > uncommitted data through same connection in same transaction. > > > > ======================================================== > > > For Example: > > > Connection con = getConnection(); // Auto commit false of connection > > > PrepareStatement statement = con.prepareStatement("Insert into > > > Test(Name, Age) values('John', 23)", Statement.RETURN_GENERATED_KEYS); > > > Object key = statement.executeUpdate(); > > > ResultSet resultSet = preparedStatement.getGeneratedKeys(); > > > key = resultSet.getObject(1); > > > statement = con.prepareStatement("Select * From Test Where Id=" + > > > key); > > > resultSet = statement.executeQuery(); > > > ======================================================= > > > > Through same connection, I am able to fetch uncommitted data like > > > above example. > > > > But how I can fetch uncommitted entities(Just put in DatastoreService > > > not committed) in GAE. > > > > Any help/suggestions are highly appreciated. > > > > Subhash -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
