Project

General

Profile

Actions

Bug #1280

closed

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

Added by Anonymous over 12 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
05/02/2012
Due date:
% Done:

0%

Estimated time:

Description

Relations:

User belongs to Post.

code :

// the bug:

dbo::ptr 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.


Files

Actions #1

Updated by Koen Deforche over 12 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.2.2
Actions #2

Updated by Koen Deforche over 12 years ago

  • Target version changed from 3.2.2 to 3.2.3

A tough nut to crack !

Actions #3

Updated by Koen Deforche about 12 years ago

  • Target version deleted (3.2.3)
Actions #4

Updated by Koen Deforche almost 11 years ago

  • Status changed from InProgress to Resolved
  • Target version set to 3.3.2

See #2574 this is resolved for SQlite3 and Postgres backends

Actions #5

Updated by Koen Deforche almost 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF