Hey Calvin,
2010/7/7 Calvin <[email protected]>:
> std::vector<dbo::FieldInfo> fld = data->fields();
> this compiles without issue but I keep getting the following linker error:
>
> error LNK2019: unresolved external symbol "public: class std::vector<class
> Wt::Dbo::FieldInfo,class std::allocator<class Wt::Dbo::FieldInfo> > const &
> __thiscall Wt::Dbo::QueryModel<class Wt::Dbo::ptr<class tesABC>
> >::fields(void)"
> (?fie...@?$querymodel@v?$...@vtesabc@@@d...@wt@@@d...@wt@@qaeabv?$vec...@vfieldinfo@d...@wt@@v?$alloca...@vfieldinfo@d...@wt@@@std@@@std@@XZ)
> referenced in function "private: void __thiscall zztesABC::requery(void)"
> (?requ...@zztesabc@@AAEXXZ)
Sorry. It seems we overlooked the implementation of this accessor method.
The (smalll) patch in attachment solves this.
Regards,
koen
commit 90c8313397b8fb30619a63d2051623d22ef8b660
Author: Koen Deforche <[email protected]>
Date: Wed Jul 7 15:55:40 2010 +0200
Implement missing fields() method
diff --git a/src/Wt/Dbo/QueryModel b/src/Wt/Dbo/QueryModel
index cb671e7..585c981 100644
--- a/src/Wt/Dbo/QueryModel
+++ b/src/Wt/Dbo/QueryModel
@@ -112,7 +112,7 @@ public:
*
* This returns the field list from the underlying query.
*/
- const std::vector<FieldInfo>& fields();
+ const std::vector<FieldInfo>& fields() const;
private:
std::vector<QueryColumn> columns_;
diff --git a/src/Wt/Dbo/QueryModel_impl.h b/src/Wt/Dbo/QueryModel_impl.h
index 5c5e53e..09bd241 100644
--- a/src/Wt/Dbo/QueryModel_impl.h
+++ b/src/Wt/Dbo/QueryModel_impl.h
@@ -190,6 +190,12 @@ int QueryModel<Result>::getFieldIndex(const std::string& field)
throw Exception("QueryModel: could not find field: '" + field + "'");
}
+template <class Result>
+const std::vector<FieldInfo>& QueryModel<Result>::fields() const
+{
+ return fields_;
+}
+
}
}
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest