Hi,
I think that i found a bug in assignment operator of Wt::Dbo::Query.
I discovered it while using it with QueryModel, after setting query second
time with setQuery().
the original code is at src/Wt/Dbo/Query_impl.h:
template <class Result>
Query<Result, DynamicBinding>&
Query<Result, DynamicBinding>::operator=
(const Query<Result, DynamicBinding>& other)
{
Impl::QueryBase<Result>::operator=(other);
where_ = other.where_;
groupBy_ = other.groupBy_;
orderBy_ = other.orderBy_;
limit_ = other.limit_;
offset_ = other.offset_;
for (unsigned i = 0; i < other.parameters_.size(); ++i)
parameters_.push_back(other.parameters_[i]->clone());
return *this;
}
I think that before adding cloned parameters, current parameters need to be
removed with reset().
Dbo backend throws exception because of extra binded parameters.
.
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest