Bug #1280
dbo - remove two classes with belong to relation may cause an error.
| Status: | Assigned | Start date: | 05/02/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due 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.
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)