Bug #1280

dbo - remove two classes with belong to relation may cause an error.

Added by Anonymous about 1 year ago. Updated 8 months ago.

Status:AssignedStart date:05/02/2012
Priority:NormalDue date:
Assignee:Koen Deforche% Done:

0%

Category:-
Target version:-

Description

Relations:

User belongs to Post.

code :
// the bug:
dbo::ptr<Post> postP = user->post;
user.modify()->post.reset();
//session.flush(); !!!
postP.remove();
user.remove();

if i do not use session.flush(); next error will be thrown:
rollback transaction
terminate called after throwing an instance of 'Wt::Dbo::backend::Sqlite3Exception'
what(): Sqlite3: delete from "post" where "id" = ? and "version" = ?: constraint failed
Aborted

Maybe dbo reorders the statements in a wrong order.

dbo_reorders_comades_-_need_flash__. (1.4 KB) Anonymous, 05/02/2012 02:33 pm

History

#1 Updated by Koen Deforche about 1 year ago

  • Status changed from New to Assigned
  • Assignee set to Koen Deforche
  • Target version set to 3.2.2

#2 Updated by Koen Deforche 12 months ago

  • Target version changed from 3.2.2 to 3.2.3

A tough nut to crack !

#3 Updated by Koen Deforche 8 months ago

  • Target version deleted (3.2.3)

Also available in: Atom PDF