I want to use a composite key in a class, I want the composite key for two long integer type fields each, however to make the declaration of the class with the composite key type using two long integers, the program generates a compile error, but if I declare the composite key with a string and a long integer, the error is not generated and the program runs correctly.
Although it works well, I wish that the statement could do with the two long integers.
Now annex the examples database, main.cpp, BTipoListado.h without error and BTipoListado.h with error:
Database:
Create two tables in postgres: bTipoListado and bTipoListado with the following SQL:
!—Tabla Tipo Secuencial
CREATE TABLE bListado
(
PK_CodigoListado int8 DEFAULT NEXTVAL('PK_CodigoListado_seq') NOT NULL,
DescripcionListado varchar(100),
primary key (PK_CodigoListado)
);
CREATE SEQUENCE PK_CodigoListado_seq;
!—Tabla Tipo Clave Compuesta
CREATE TABLE bTipoListado (
PK_CodigoTipoListado int8 not null,
FK_CodigoListado int8 not null,
DescripcionTipoListado varchar(100),
primary key (PK_CodigoTipoListado, FK_CodigoListado)
);
Main.cpp:
- Code: Select all
#include "../include/precompiled.h"
#include "../include/bListado.h"
#include "../include/bTipoListado.h"
#include <QtCore/qcoreapplication.h>
#include <QxMemLeak.h>
#include <QtGui/qapplication.h>
int main(int argc, char * argv[])
{
// Aplicación Qt
QApplication app(argc, argv);
// ************************ BASE DE DATOS ************************
// Inicializa los parámetros para la comunicación con la base de datos
qx::QxSqlDatabase::getSingleton()->setDriverName("QPSQL");
qx::QxSqlDatabase::getSingleton()->setDatabaseName("BD1.2");
qx::QxSqlDatabase::getSingleton()->setHostName("localhost");
qx::QxSqlDatabase::getSingleton()->setUserName("postgres");
qx::QxSqlDatabase::getSingleton()->setPassword("postgres");
qx::QxSqlDatabase::getSingleton()->setPort(5432);
// ************************ INSERTAR OBJETOS ************************
// Control de errores
QSqlError daoError;
qx::QxSqlQuery query("WHERE bTipoListado.DescripcionTipoListado = 'Calculados'");
lista_btipo lista;
daoError = qx::dao::fetch_by_query(query, lista);
for (long l = 0; l < lista.count(); ++l)
{
bTipoListado_ptr p = lista.getByIndex(l);
qDebug() << "DescripcionTipoListado: " << qPrintable(p->DescripcionTipoListado);
qDebug() << "CodigoTipoListado: " << p->GetPK_CodigoTipoListado();
qDebug() << "CodigoListado: " << p->GetFK_CodigoListado();
}
return 0;
}
BTipoListado.h - Example without error:
- Code: Select all
#include "../include/bListado.h"
#ifndef _QX_SUITE_BTIPOLISTADO_H_
#define _QX_SUITE_BTIPOLISTADO_H_
class QX_SUITE_DLL_EXPORT bTipoListado
{
public:
// Clave compuesta (multiples-columnas de clave primaria en la base de datos)
typedef boost::tuple<QString, long> QCompuesta;
static QString str_composite_key() { return "PK_CodigoTipoListado|FK_CodigoListado"; }
QCompuesta PK_Compuesta;
QString DescripcionTipoListado;
// Constructor y Destructor
bTipoListado(): PK_Compuesta("0",0) { ; }
virtual ~bTipoListado() { ; }
// Metodos "Get" para la clave compuesta
QCompuesta GetClaveCompuesta() const {return PK_Compuesta;}
QString GetPK_CodigoTipoListado() const {return boost::tuples::get<0>(PK_Compuesta);}
long GetFK_CodigoListado() const {return boost::tuples::get<1>(PK_Compuesta);}
// Metodos "Set" para la clave compuesta
void SetPK_CodigoTipoListado(QString codigoTipoListado) {boost::tuples::get<0>(PK_Compuesta) = codigoTipoListado;}
void SetPK_CodigoListado(long codigoListado) {boost::tuples::get<1>(PK_Compuesta) = codigoListado;}
};
QX_REGISTER_PRIMARY_KEY(bTipoListado, bTipoListado::QCompuesta)
QX_REGISTER_HPP_QX_SUITE(bTipoListado, qx::trait::no_base_class_defined, 0)
// Crea objeto 'bListado'
typedef boost::shared_ptr<bTipoListado> bTipoListado_ptr;
// Lista de objetos 'bTipoListado'
typedef qx::QxCollection<bTipoListado::QCompuesta, bTipoListado_ptr> lista_btipo;
#endif
Results generated without error:
- Code: Select all
Debugging starts
QxOrm.DllMain() ---> DLL_PROCESS_ATTACH
QxOrm.DllMain() ---> DLL_THREAD_ATTACH
[QxOrm] qx::QxSqlDatabase : create new database connection in thread '3636' with key '{a01dbe90-a538-4607-ad93-27724399e191}'
[QxOrm] sql query (2572 ms) : SELECT bTipoListado.PK_CodigoTipoListado AS bTipoListado_PK_CodigoTipoListado_0, bTipoListado.FK_CodigoListado AS bTipoListado_FK_CodigoListado_0, bTipoListado.DescripcionTipoListado AS bTipoListado_DescripcionTipoListado_0 FROM bTipoListado WHERE bTipoListado.DescripcionTipoListado = 'Calculados'
DescripcionTipoListado: Calculados
CodigoTipoListado: "2"
CodigoListado: 1
QxOrm.DllMain() ---> DLL_THREAD_DETACH
QxOrm.DllMain() ---> DLL_PROCESS_DETACH
Debugging has finished
BTipoListado.h - Example with error:
- Code: Select all
#include "../include/bListado.h"
#ifndef _QX_SUITE_BTIPOLISTADO_H_
#define _QX_SUITE_BTIPOLISTADO_H_
class QX_SUITE_DLL_EXPORT bTipoListado
{
public:
// Clave compuesta (multiples-columnas de clave primaria en la base de datos)
typedef boost::tuple<long, long> QCompuesta;
static QString str_composite_key() { return "PK_CodigoTipoListado|FK_CodigoListado"; }
QCompuesta PK_Compuesta;
QString DescripcionTipoListado;
// Constructor y Destructor
bTipoListado(): PK_Compuesta(0,0) { ; }
virtual ~bTipoListado() { ; }
// Metodos "Get" para la clave compuesta
QCompuesta GetClaveCompuesta() const {return PK_Compuesta;}
long GetPK_CodigoTipoListado() const {return boost::tuples::get<0>(PK_Compuesta);}
long GetFK_CodigoListado() const {return boost::tuples::get<1>(PK_Compuesta);}
// Metodos "Set" para la clave compuesta
void SetPK_CodigoTipoListado(long codigoTipoListado) {boost::tuples::get<0>(PK_Compuesta) = codigoTipoListado;}
void SetPK_CodigoListado(long codigoListado) {boost::tuples::get<1>(PK_Compuesta) = codigoListado;}
};
QX_REGISTER_PRIMARY_KEY(bTipoListado, bTipoListado::QCompuesta)
QX_REGISTER_HPP_QX_SUITE(bTipoListado, qx::trait::no_base_class_defined, 0)
// Crea objeto 'bListado'
typedef boost::shared_ptr<bTipoListado> bTipoListado_ptr;
// Lista de objetos 'bTipoListado'
typedef qx::QxCollection<bTipoListado::QCompuesta, bTipoListado_ptr> lista_btipo;
#endif
Compile error:
- Code: Select all
Running build steps for project qxEjemplo1.2...
Configuration unchanged, skipping qmake step.
Starting: "D:\Qt\qtcreator-2.2.1\mingw\bin\mingw32-make.exe"
D:/Qt/qtcreator-2.2.1/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `D:/Qt/QxOrm/test/qxEjemplo1-2-build-desktop'
g++ -c -include debug\precompiled.h -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -D_CONSTRUYENDO_QX_SUITE -DQT_DLL -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\4.7.3\include\QtCore" -I"..\..\..\4.7.3\include\QtNetwork" -I"..\..\..\4.7.3\include\QtGui" -I"..\..\..\4.7.3\include\QtXml" -I"..\..\..\4.7.3\include\QtSql" -I"..\..\..\4.7.3\include" -I"..\qxEjemplo1.2\include" -I"..\..\boost" -I"..\..\include" -I"..\..\..\4.7.3\include\ActiveQt" -I"qt\moc" -I"..\qxEjemplo1.2" -I"." -I"..\..\..\4.7.3\mkspecs\win32-g++" -o debug\bTipoListado.o ..\qxEjemplo1.2\src\bTipoListado.cpp
g++ -c -include debug\precompiled.h -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -D_CONSTRUYENDO_QX_SUITE -DQT_DLL -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\4.7.3\include\QtCore" -I"..\..\..\4.7.3\include\QtNetwork" -I"..\..\..\4.7.3\include\QtGui" -I"..\..\..\4.7.3\include\QtXml" -I"..\..\..\4.7.3\include\QtSql" -I"..\..\..\4.7.3\include" -I"..\qxEjemplo1.2\include" -I"..\..\boost" -I"..\..\include" -I"..\..\..\4.7.3\include\ActiveQt" -I"qt\moc" -I"..\qxEjemplo1.2" -I"." -I"..\..\..\4.7.3\mkspecs\win32-g++" -o debug\main.o ..\qxEjemplo1.2\src\main.cpp
In file included from ..\..\boost/boost/functional/hash/hash.hpp:494,
from ..\..\boost/boost/functional/hash.hpp:6,
from ..\..\boost/boost/unordered/unordered_map.hpp:17,
from ..\..\boost/boost/unordered_map.hpp:16,
from ..\..\include/QxPrecompiled.h:84,
from ..\..\include/QxOrm.h:49,
from ..\qxEjemplo1.2\include\precompiled.h:4:
..\..\boost/boost/functional/hash/extensions.hpp: In member function 'size_t boost::hash<T>::operator()(const T&) const [with T = boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>]':
..\..\boost/boost/multi_index/hashed_index.hpp:439: instantiated from 'boost::multi_index::detail::hashed_index_iterator<boost::multi_index::detail::hashed_index_node<typename SuperMeta::type::node_type>, boost::multi_index::detail::bucket_array<typename SuperMeta::type::final_allocator_type> > boost::multi_index::detail::hashed_index<KeyFromValue, Hash, Pred, SuperMeta, TagList, Category>::find(const CompatibleKey&, const CompatibleHash&, const CompatiblePred&) const [with CompatibleKey = boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, CompatibleHash = boost::hash<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >, CompatiblePred = std::equal_to<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >, KeyFromValue = boost::multi_index::member<QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >, boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, &QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >::first>, Hash = boost::hash<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >, Pred = std::equal_to<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >, SuperMeta = boost::multi_index::detail::nth_layer<2, QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >, boost::multi_index::indexed_by<boost::multi_index::random_access<boost::multi_index::tag<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >, boost::multi_index::hashed_unique<boost::multi_index::member<QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >, boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, &QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >::first>, mpl_::na, mpl_::na, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> > > >, TagList = boost::mpl::vector0<mpl_::na>, Category = boost::multi_index::detail::hashed_unique_tag]'
..\..\boost/boost/multi_index/hashed_index.hpp:429: instantiated from 'boost::multi_index::detail::hashed_index_iterator<boost::multi_index::detail::hashed_index_node<typename SuperMeta::type::node_type>, boost::multi_index::detail::bucket_array<typename SuperMeta::type::final_allocator_type> > boost::multi_index::detail::hashed_index<KeyFromValue, Hash, Pred, SuperMeta, TagList, Category>::find(const CompatibleKey&) const [with CompatibleKey = boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, KeyFromValue = boost::multi_index::member<QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >, boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, &QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >::first>, Hash = boost::hash<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >, Pred = std::equal_to<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> >, SuperMeta = boost::multi_index::detail::nth_layer<2, QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >, boost::multi_index::indexed_by<boost::multi_index::random_access<boost::multi_index::tag<mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >, boost::multi_index::hashed_unique<boost::multi_index::member<QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >, boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, &QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >::first>, mpl_::na, mpl_::na, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<QPair<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> > > >, TagList = boost::mpl::vector0<mpl_::na>, Category = boost::multi_index::detail::hashed_unique_tag]'
..\..\include/QxCollection/../../inl/QxCollection/QxCollection.inl:179: instantiated from 'bool qx::QxCollection<Key, Value>::contains(const Key&) const [with Key = boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, Value = boost::shared_ptr<bTipoListado>]'
..\..\include/QxCollection/../../inl/QxCollection/QxCollection.inl:185: instantiated from 'bool qx::QxCollection<Key, Value>::exist(const Key&) const [with Key = boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, Value = boost::shared_ptr<bTipoListado>]'
..\..\include/QxCollection/../../inl/QxCollection/QxCollection.inl:209: instantiated from 'bool qx::QxCollection<Key, Value>::insert(const Key&, const Value&) [with Key = boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, Value = boost::shared_ptr<bTipoListado>]'
..\..\include/QxTraits/generic_container.h:311: instantiated from 'static void qx::trait::generic_container<qx::QxCollection<Key, Value> >::insertItem(qx::QxCollection<Key, Value>&, qx::trait::generic_container_item<Key, Value>&) [with Key = boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, Value = boost::shared_ptr<bTipoListado>]'
..\..\include/QxDao/../../inl/QxDao/QxDao_FetchAll.inl:87: instantiated from 'static void qx::dao::detail::QxDao_FetchAll_Container<T>::insertNewItem(T&, qx::dao::detail::QxDao_Helper_Container<T>&) [with T = qx::QxCollection<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >]'
..\..\include/QxDao/../../inl/QxDao/QxDao_FetchAll.inl:68: instantiated from 'static QSqlError qx::dao::detail::QxDao_FetchAll_Container<T>::fetchAll(const qx::QxSqlQuery&, T&, QSqlDatabase*, const QStringList&) [with T = qx::QxCollection<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >]'
..\..\include/QxDao/../../inl/QxDao/QxDao_FetchAll.inl:111: instantiated from 'static QSqlError qx::dao::detail::QxDao_FetchAll<T>::fetchAll(const qx::QxSqlQuery&, T&, QSqlDatabase*, const QStringList&) [with T = qx::QxCollection<boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, boost::shared_ptr<bTipoListado> >]'
..\..\include/QxDao/QxDao.h:703: instantiated from 'QSqlError qx::dao::fetch_by_query(const qx::QxSqlQuery&, T&) [with T = lista_btipo]'
..\qxEjemplo1.2\src\main.cpp:32: instantiated from here
..\..\boost/boost/functional/hash/extensions.hpp:176: error: no hay una función coincidente para la llamada a 'hash_value(const boost::tuples::tuple<long int, long int, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>&)'
..\..\boost/boost/functional/hash/hash.hpp:120: nota: los candidatos son: size_t boost::hash_value(bool)
..\..\boost/boost/functional/hash/hash.hpp:125: nota: size_t boost::hash_value(char)
..\..\boost/boost/functional/hash/hash.hpp:130: nota: size_t boost::hash_value(unsigned char)
..\..\boost/boost/functional/hash/hash.hpp:135: nota: size_t boost::hash_value(signed char)
..\..\boost/boost/functional/hash/hash.hpp:140: nota: size_t boost::hash_value(short int)
..\..\boost/boost/functional/hash/hash.hpp:145: nota: size_t boost::hash_value(short unsigned int)
..\..\boost/boost/functional/hash/hash.hpp:150: nota: size_t boost::hash_value(int)
..\..\boost/boost/functional/hash/hash.hpp:155: nota: size_t boost::hash_value(unsigned int)
..\..\boost/boost/functional/hash/hash.hpp:160: nota: size_t boost::hash_value(long int)
..\..\boost/boost/functional/hash/hash.hpp:165: nota: size_t boost::hash_value(long unsigned int)
..\..\boost/boost/functional/hash/hash.hpp:171: nota: size_t boost::hash_value(wchar_t)
..\..\boost/boost/functional/hash/hash.hpp:178: nota: size_t boost::hash_value(boost::long_long_type)
..\..\boost/boost/functional/hash/hash.hpp:183: nota: size_t boost::hash_value(boost::ulong_long_type)
..\..\boost/boost/functional/hash/hash.hpp:297: nota: size_t boost::hash_value(float)
..\..\boost/boost/functional/hash/hash.hpp:302: nota: size_t boost::hash_value(double)
..\..\boost/boost/functional/hash/hash.hpp:307: nota: size_t boost::hash_value(long double)
mingw32-make[1]: Leaving directory `D:/Qt/QxOrm/test/qxEjemplo1-2-build-desktop'
mingw32-make[1]: *** [debug/main.o] Error 1
mingw32-make: *** [debug] Error 2
The process "D:\Qt\qtcreator-2.2.1\mingw\bin\mingw32-make.exe" exited with code 2.
Error while building project qxEjemplo1.2 (target: Desktop)
When executing build step 'Make'
Thanks again for any help.