Actions
Feature #1124
closedDbo: allow to bind dbo::ptr
Start date:
01/07/2012
Due date:
% Done:
0%
Estimated time:
Description
Hello!
Look at this code:
Posts posts = session_.find<Post>
("where date >= ? "
"and date < ? "
"and (state = ? or author_id = ?)")
.bind(WDateTime(lower))
.bind(WDateTime(upper))
.bind(Post::Published)
.bind(session_.user().id());
and this:
"delete from " + session_.tableName<AuthIdentityType>() +
" where " + session_.tableName<DboType>() + "_id = ?"
" and provider = ?").bind(user.id()).bind(provider);
Using of ptr.id() in .bind() is annoying.
Moreover, should '.id()' be forgotten, this results in bad error:
code without '.id()' is compilable and cause Segmentation fault in my case.
(This error is rather difficult to find, since code like 'session.find("friend = ?").bind(user)' looks Ok.)
Could you change .bind() method to take ptr, please?
BR.
Updated by Koen Deforche almost 13 years ago
- Status changed from New to Resolved
- Target version set to 3.2.1
Hey,
I've fixed this in git, and will push this later today.
Regards,
koen
Actions