Hello
after creating one user and add child post and flushing session,
User *user2 = new User();
user2->name = "Daisy";
user2->password = "Secret2";
user2->role = User::Visitor;
user2->karma = 12;
dbo::ptr<User> user2Ptr = session.add(user2);
dbo::ptr<Post> postPtr = session.add(new Post());
postPtr.modify()->user = user2Ptr;
session.flush();
user2Ptr.remove();
transaction.commit();
I am currently implementing new SqlConnection based on Qt Sql ODBC
driver. (to access mdb)
when I execute above example in sqlite, it seems that post is deleted
not automatically.
and it is strange that foreign key of post holds deleted user id.
is this correct result? I don't know sqlite well. doesn't references
keyword check referential integrity?
and I want to know which one is desirable operation when I delete user
by user.remove().
1. child post have to be removed automatically too
2. or do I have to remove post before user?
I though case 1 is more convenient but dbo doesn't do that now.
I want to know right usage.
regards
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest