I also have a similar problem.
in my exsample:
@Entity
class Test {
@Id
@Column(name = "ID")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private Boolean isLatest;
}
# service
Test test = TestDao.getByCode("code")
test.setIsLatest(false)
TestDao.save(createTest())
#warning-log
Request completed without committing or rolling back transaction with
id 7. Transaction will be rolled back.
When I comment out the line of "TestDao.save(createTest())", test is
merged.
And when i comment out the lines to merge, "TestDao.save" is success.
I wanna merge and save for same Model.
why can't i do it?plz tell me about it.
On 7月21日, 午前12:56, Sekhar <[email protected]> wrote:
> Anyone? Would appreciate just about any help you can give!
>
> On Jul 15, 8:45 am, Sekhar <[email protected]> wrote:
>
>
>
> > I pretty frequently get an error for my JPA entities saying an entity
> > is "is detached yet this operation requires it to be attached" and the
> > transaction isrolledback:
> > "com.google.apphosting.utils.servlet.TransactionCleanupFilter
> >handleAbandonedTxns: Request completed without committing or
> >rollingbacktransaction with id 6520345908250195886. Transaction will
> >berolledback."
>
> > What does this error mean and how do I get rid of this? I did check
> > the DataNucleus docs and didn't really get any info on this. I have
> > datanucleus.NontransactionalRead and datanucleus.NontransactionalWrite
> > both set to true and open the transactions only to do the merge - is
> > that the problem? E.g., something like:
>
> > List<MyEntity> list = query.getResultList();
> > MyEntity e0 = list.get(0);
> > e0.setWhatever(whatever);
>
> > tx.begin();
> > entityManager.merge(e0);
> > tx.commit();
--
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.