Project

General

Profile

Actions

Bug #1280

closed
KD

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

Bug #1280: dbo - remove two classes with belong to relation may cause an error.

Added by Anonymous over 14 years ago. Updated over 12 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

KD Updated by Koen Deforche over 14 years ago Actions #1

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

KD Updated by Koen Deforche about 14 years ago Actions #2

  • Target version changed from 3.2.2 to 3.2.3

A tough nut to crack !

KD Updated by Koen Deforche almost 14 years ago Actions #3

  • Target version deleted (3.2.3)

KD Updated by Koen Deforche over 12 years ago Actions #4

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

See #2574 this is resolved for SQlite3 and Postgres backends

KD Updated by Koen Deforche over 12 years ago Actions #5

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom