Duplicate keys during QxSqlRelation::init

Forum for posting problems using QxOrm library

Duplicate keys during QxSqlRelation::init

Postby SteveW » Thu Feb 04, 2016 3:43 pm

Hi,

During the _fetchAll() service call at the Server/Service end, as it is running through QxSqlQueryBuilder::init code, it ends up deep into the call stack during the nested calls to QxSqlRelation::init for all the dependant tables/classes, it eventually ends up hitting an assertion in the .insert() call during the loop...

Code: Select all
     
 for (long l = 0; l < lCount; ++l) { if ((p = isValid_SqlRelation(l))) { m_lstSqlRelation.insert(p->getKey(), p->getSqlRelation()); } }


Code: Select all
inline bool QxCollection<Key, Value>::insert(const Key & key, const Value & value)
{
->>> qAssert(! exist(key));
        return m_qxCollection.template get<0>().push_back(type_pair_key_value(key, value)).second;
}



...because the table's field name apparently already exists in the m_qxCollection.

I have attached a TXT file of the full call-stack so you can see how deep it got, and how the dependancies are setup.

I apprecaite this might not be enough info for you to go on, so if you need anything else please ask. I have attempted (am still attempting) to debug through the QxORM code that is creating these QxSqlRelation dependancies to see if I can work out why, but if you know what might be causing this any help would be appreciated.

Steve
SteveW
 
Posts: 53
Joined: Tue Jan 19, 2016 4:12 pm

Re: Duplicate keys during QxSqlRelation::init

Postby SteveW » Thu Feb 04, 2016 3:47 pm

(I could not attach a TXT file, so I have pasted the entire thing below...)

Code: Select all
0   QSortFilterProxyModel::mapToSource   Qt5Cored      0x66ae6c21   
1   QSortFilterProxyModel::mapToSource   Qt5Cored      0x66ae593d   
2   QSortFilterProxyModel::mapToSource   Qt5Cored      0x66adc6c4   
3   qx::QxCollection<QString,qx::IxSqlRelation *>::insert   QxCollection.inl   215   0x7c3f130   
4   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<dataset_operator_link>>,dataset_operator>::init   QxSqlRelation.h   121   0x803b1f3   
5   qx::QxSqlRelation<boost::shared_ptr<dataset_operator>,schedule>::isValid_SqlRelation   QxSqlRelation.h   140   0x8222474   
6   qx::QxSqlRelation<boost::shared_ptr<dataset_operator>,schedule>::init   QxSqlRelation.h   121   0x8220682   
7   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<schedule>>,customer_action_description>::isValid_SqlRelation   QxSqlRelation.h   140   0x7eb36b4   
8   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<schedule>>,customer_action_description>::init   QxSqlRelation.h   121   0x7eae2a2   
9   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action_description>>,customer_action_group>::isValid_SqlRelation   QxSqlRelation.h   140   0x7ee85b4   
10   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action_description>>,customer_action_group>::init   QxSqlRelation.h   121   0x7ee4862   
11   qx::QxSqlRelation<boost::shared_ptr<customer_action_group>,customer_action_description>::isValid_SqlRelation   QxSqlRelation.h   140   0x7eb3984   
12   qx::QxSqlRelation<boost::shared_ptr<customer_action_group>,customer_action_description>::init   QxSqlRelation.h   121   0x7eaee12   
13   qx::QxSqlRelation<boost::shared_ptr<customer_action_description>,customer_action>::isValid_SqlRelation   QxSqlRelation.h   140   0x7e434d4   
14   qx::QxSqlRelation<boost::shared_ptr<customer_action_description>,customer_action>::init   QxSqlRelation.h   121   0x7e3a242   
15   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action>>,customer_action_urgency>::isValid_SqlRelation   QxSqlRelation.h   140   0x7efba24   
16   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action>>,customer_action_urgency>::init   QxSqlRelation.h   121   0x7efa0c2   
17   qx::QxSqlRelation<boost::shared_ptr<customer_action_urgency>,customer_action>::isValid_SqlRelation   QxSqlRelation.h   140   0x7e435c4   
18   qx::QxSqlRelation<boost::shared_ptr<customer_action_urgency>,customer_action>::init   QxSqlRelation.h   121   0x7e3a612   
19   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action>>,contact_communication_detail>::isValid_SqlRelation   QxSqlRelation.h   140   0x7d12094   
20   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action>>,contact_communication_detail>::init   QxSqlRelation.h   121   0x7d0d642   
21   qx::QxSqlRelation<boost::shared_ptr<contact_communication_detail>,customer_action>::isValid_SqlRelation   QxSqlRelation.h   140   0x7e433e4   
22   qx::QxSqlRelation<boost::shared_ptr<contact_communication_detail>,customer_action>::init   QxSqlRelation.h   121   0x7e39e72   
23   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action>>,customer_action_description>::isValid_SqlRelation   QxSqlRelation.h   140   0x7eb35c4   
24   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action>>,customer_action_description>::init   QxSqlRelation.h   121   0x7eaded2   
25   qx::QxSqlRelation<boost::shared_ptr<customer_action_description>,sum_it_module>::isValid_SqlRelation   QxSqlRelation.h   140   0x8257f74   
26   qx::QxSqlRelation<boost::shared_ptr<customer_action_description>,sum_it_module>::init   QxSqlRelation.h   121   0x82555d2   
27   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_module>>,module>::isValid_SqlRelation   QxSqlRelation.h   140   0x80db024   
28   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_module>>,module>::init   QxSqlRelation.h   121   0x80d1b02   
29   qx::QxSqlRelation<boost::shared_ptr<module>,module_version>::isValid_SqlRelation   QxSqlRelation.h   140   0x8212914   
30   qx::QxSqlRelation<boost::shared_ptr<module>,module_version>::init   QxSqlRelation.h   121   0x8211042   
31   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module_version>>,module>::isValid_SqlRelation   QxSqlRelation.h   140   0x80daf34   
32   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module_version>>,module>::init   QxSqlRelation.h   121   0x80d1732   
33   qx::QxSqlRelation<boost::shared_ptr<module>,module_os_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x81a61f4   
34   qx::QxSqlRelation<boost::shared_ptr<module>,module_os_link>::init   QxSqlRelation.h   121   0x81a3dc2   
35   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module_os_link>>,module>::isValid_SqlRelation   QxSqlRelation.h   140   0x80dae44   
36   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module_os_link>>,module>::init   QxSqlRelation.h   121   0x80d1362   
37   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module>>,module_enterprise_group>::isValid_SqlRelation   QxSqlRelation.h   140   0x8155e14   
38   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module>>,module_enterprise_group>::init   QxSqlRelation.h   121   0x81535f2   
39   qx::QxSqlRelation<boost::shared_ptr<module_enterprise_group>,module>::isValid_SqlRelation   QxSqlRelation.h   140   0x80db114   
40   qx::QxSqlRelation<boost::shared_ptr<module_enterprise_group>,module>::init   QxSqlRelation.h   121   0x80d1ed2   
41   qx::QxSqlRelation<boost::shared_ptr<module>,module_cost>::isValid_SqlRelation   QxSqlRelation.h   140   0x8137014   
42   qx::QxSqlRelation<boost::shared_ptr<module>,module_cost>::init   QxSqlRelation.h   121   0x8133e52   
43   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module_cost>>,sum_it_support_description>::isValid_SqlRelation   QxSqlRelation.h   140   0x82d8bb4   
44   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module_cost>>,sum_it_support_description>::init   QxSqlRelation.h   121   0x82d4ed2   
45   qx::QxSqlRelation<boost::shared_ptr<sum_it_support_description>,sum_it_support>::isValid_SqlRelation   QxSqlRelation.h   140   0x82a83f4   
46   qx::QxSqlRelation<boost::shared_ptr<sum_it_support_description>,sum_it_support>::init   QxSqlRelation.h   121   0x82a44d2   
47   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_support>>,module_support_group>::isValid_SqlRelation   QxSqlRelation.h   140   0x81e4f14   
48   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_support>>,module_support_group>::init   QxSqlRelation.h   121   0x81dfb12   
49   qx::QxSqlRelation<boost::shared_ptr<module_support_group>,module_support_group_cost>::isValid_SqlRelation   QxSqlRelation.h   140   0x8207fb4   
50   qx::QxSqlRelation<boost::shared_ptr<module_support_group>,module_support_group_cost>::init   QxSqlRelation.h   121   0x8206152   
51   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module_support_group_cost>>,module_support_group>::isValid_SqlRelation   QxSqlRelation.h   140   0x81e4e24   
52   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module_support_group_cost>>,module_support_group>::init   QxSqlRelation.h   121   0x81df742   
53   qx::QxSqlRelation<boost::shared_ptr<module_support_group>,module>::isValid_SqlRelation   QxSqlRelation.h   140   0x80db204   
54   qx::QxSqlRelation<boost::shared_ptr<module_support_group>,module>::init   QxSqlRelation.h   121   0x80d22a2   
55   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module>>,module_support_group>::isValid_SqlRelation   QxSqlRelation.h   140   0x81e4d34   
56   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<module>>,module_support_group>::init   QxSqlRelation.h   121   0x81df372   
57   qx::QxSqlRelation<boost::shared_ptr<module_support_group>,sum_it_support>::isValid_SqlRelation   QxSqlRelation.h   140   0x82a8214   
58   qx::QxSqlRelation<boost::shared_ptr<module_support_group>,sum_it_support>::init   QxSqlRelation.h   121   0x82a3d32   
59   qx::QxSqlRelation<boost::shared_ptr<sum_it_support>,sum_it_module_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x827adc4   
60   qx::QxSqlRelation<boost::shared_ptr<sum_it_support>,sum_it_module_link>::init   QxSqlRelation.h   121   0x8278e62   
61   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_module_link>>,sum_it_support>::isValid_SqlRelation   QxSqlRelation.h   140   0x82a8034   
62   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_module_link>>,sum_it_support>::init   QxSqlRelation.h   121   0x82a3592   
63   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_support>>,sum_it_licence>::isValid_SqlRelation   QxSqlRelation.h   140   0x8243c74   
64   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_support>>,sum_it_licence>::init   QxSqlRelation.h   121   0x8240da2   
65   qx::QxSqlRelation<boost::shared_ptr<sum_it_licence>,sum_it_module_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x827abe4   
66   qx::QxSqlRelation<boost::shared_ptr<sum_it_licence>,sum_it_module_link>::init   QxSqlRelation.h   121   0x82786c2   
67   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_module_link>>,sum_it_licence>::isValid_SqlRelation   QxSqlRelation.h   140   0x8243b84   
68   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_module_link>>,sum_it_licence>::init   QxSqlRelation.h   121   0x82409d2   
69   qx::QxSqlRelation<boost::shared_ptr<sum_it_licence>,sum_it_module>::isValid_SqlRelation   QxSqlRelation.h   140   0x8258154   
70   qx::QxSqlRelation<boost::shared_ptr<sum_it_licence>,sum_it_module>::init   QxSqlRelation.h   121   0x8255d72   
71   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_module>>,sum_it_licence>::isValid_SqlRelation   QxSqlRelation.h   140   0x8243a94   
72   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_module>>,sum_it_licence>::init   QxSqlRelation.h   121   0x8240602   
73   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_licence>>,customer_type_description>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fea8a4   
74   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_licence>>,customer_type_description>::init   QxSqlRelation.h   121   0x7fe77f2   
75   qx::QxSqlRelation<boost::shared_ptr<customer_type_description>,customer_use_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x80162a4   
76   qx::QxSqlRelation<boost::shared_ptr<customer_type_description>,customer_use_link>::init   QxSqlRelation.h   121   0x8014862   
77   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_use_link>>,customer_type_description>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fea7b4   
78   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_use_link>>,customer_type_description>::init   QxSqlRelation.h   121   0x7fe7422   
79   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_type_description>>,customer_type_description_type>::isValid_SqlRelation   QxSqlRelation.h   140   0x8007014   
80   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_type_description>>,customer_type_description_type>::init   QxSqlRelation.h   121   0x80047f2   
81   qx::QxSqlRelation<boost::shared_ptr<customer_type_description_type>,customer_type_description>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fea994   
82   qx::QxSqlRelation<boost::shared_ptr<customer_type_description_type>,customer_type_description>::init   QxSqlRelation.h   121   0x7fe7bc2   
83   qx::QxSqlRelation<boost::shared_ptr<customer_type_description>,contact_role_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x7dbde04   
84   qx::QxSqlRelation<boost::shared_ptr<customer_type_description>,contact_role_link>::init   QxSqlRelation.h   121   0x7dbb8d2   
85   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_role_link>>,contact_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x7d836e4   
86   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_role_link>>,contact_link>::init   QxSqlRelation.h   121   0x7d7e3f2   
87   qx::QxSqlRelation<boost::shared_ptr<contact_link>,contact_role_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x7dbdd14   
88   qx::QxSqlRelation<boost::shared_ptr<contact_link>,contact_role_link>::init   QxSqlRelation.h   121   0x7dbb502   
89   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_role_link>>,customer_type_description>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fea6c4   
90   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_role_link>>,customer_type_description>::init   QxSqlRelation.h   121   0x7fe7052   
91   qx::QxSqlRelation<boost::shared_ptr<customer_type_description>,sum_it_licence>::isValid_SqlRelation   QxSqlRelation.h   140   0x8243e54   
92   qx::QxSqlRelation<boost::shared_ptr<customer_type_description>,sum_it_licence>::init   QxSqlRelation.h   121   0x8241542   
93   qx::QxSqlRelation<boost::shared_ptr<sum_it_licence>,customer_job>::isValid_SqlRelation   QxSqlRelation.h   140   0x7f2e834   
94   qx::QxSqlRelation<boost::shared_ptr<sum_it_licence>,customer_job>::init   QxSqlRelation.h   121   0x7f2bc72   
95   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_job>>,sum_it_licence>::isValid_SqlRelation   QxSqlRelation.h   140   0x82439a4   
96   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_job>>,sum_it_licence>::init   QxSqlRelation.h   121   0x8240232   
97   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_licence>>,customer_main_record>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fa3bf4   
98   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_licence>>,customer_main_record>::init   QxSqlRelation.h   121   0x7f9a1c2   
99   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,sum_it_additional_info>::isValid_SqlRelation   QxSqlRelation.h   140   0x822d724   
100   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,sum_it_additional_info>::init   QxSqlRelation.h   121   0x822bed2   
101   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_additional_info>>,customer_main_record>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fa3b04   
102   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<sum_it_additional_info>>,customer_main_record>::init   QxSqlRelation.h   121   0x7f99df2   
103   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,dataset_operator>::isValid_SqlRelation   QxSqlRelation.h   140   0x803f664   
104   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,dataset_operator>::init   QxSqlRelation.h   121   0x803b952   
105   qx::QxSqlRelation<boost::shared_ptr<dataset_operator>,customer_action>::isValid_SqlRelation   QxSqlRelation.h   140   0x7e437a4   
106   qx::QxSqlRelation<boost::shared_ptr<dataset_operator>,customer_action>::init   QxSqlRelation.h   121   0x7e3adb2   
107   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action>>,dataset_operator>::isValid_SqlRelation   QxSqlRelation.h   140   0x803f394   
108   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action>>,dataset_operator>::init   QxSqlRelation.h   121   0x803ade2   
109   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<dataset_operator>>,customer_main_record>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fa3a14   
110   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<dataset_operator>>,customer_main_record>::init   QxSqlRelation.h   121   0x7f99a22   
111   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,customer_use_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x80161b4   
112   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,customer_use_link>::init   QxSqlRelation.h   121   0x8014492   
113   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_use_link>>,customer_main_record>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fa3924   
114   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_use_link>>,customer_main_record>::init   QxSqlRelation.h   121   0x7f99652   
115   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_main_record>>,contact_address>::isValid_SqlRelation   QxSqlRelation.h   140   0x7c49a54   
116   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_main_record>>,contact_address>::init   QxSqlRelation.h   121   0x7c3de12   
117   qx::QxSqlRelation<boost::shared_ptr<contact_address>,contact_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x7d837d4   
118   qx::QxSqlRelation<boost::shared_ptr<contact_address>,contact_link>::init   QxSqlRelation.h   121   0x7d7e7c2   
119   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_link>>,contact_communication_detail>::isValid_SqlRelation   QxSqlRelation.h   140   0x7d11fa4   
120   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_link>>,contact_communication_detail>::init   QxSqlRelation.h   121   0x7d0d272   
121   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_communication_detail>>,contact_communication_detail_type>::isValid_SqlRelation   QxSqlRelation.h   140   0x7d43f84   
122   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_communication_detail>>,contact_communication_detail_type>::init   QxSqlRelation.h   121   0x7d41072   
123   qx::QxSqlRelation<boost::shared_ptr<contact_communication_detail_type>,contact_communication_detail>::isValid_SqlRelation   QxSqlRelation.h   140   0x7d12184   
124   qx::QxSqlRelation<boost::shared_ptr<contact_communication_detail_type>,contact_communication_detail>::init   QxSqlRelation.h   121   0x7d0da12   
125   qx::QxSqlRelation<boost::shared_ptr<contact_communication_detail>,contact_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x7d838c4   
126   qx::QxSqlRelation<boost::shared_ptr<contact_communication_detail>,contact_link>::init   QxSqlRelation.h   121   0x7d7eb92   
127   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_link>>,contact_name>::isValid_SqlRelation   QxSqlRelation.h   140   0x7da41b4   
128   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_link>>,contact_name>::init   QxSqlRelation.h   121   0x7da2852   
129   qx::QxSqlRelation<boost::shared_ptr<contact_name>,contact_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x7d839b4   
130   qx::QxSqlRelation<boost::shared_ptr<contact_name>,contact_link>::init   QxSqlRelation.h   121   0x7d7ef62   
131   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_link>>,contact_address>::isValid_SqlRelation   QxSqlRelation.h   140   0x7c49964   
132   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_link>>,contact_address>::init   QxSqlRelation.h   121   0x7c3da42   
133   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_address>>,contact_address_country>::isValid_SqlRelation   QxSqlRelation.h   140   0x7cc1664   
134   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_address>>,contact_address_country>::init   QxSqlRelation.h   121   0x7cbd142   
135   qx::QxSqlRelation<boost::shared_ptr<contact_address_country>,contact_address>::isValid_SqlRelation   QxSqlRelation.h   140   0x7c49b44   
136   qx::QxSqlRelation<boost::shared_ptr<contact_address_country>,contact_address>::init   QxSqlRelation.h   121   0x7c3e1e2   
137   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_address>>,contact_address_county>::isValid_SqlRelation   QxSqlRelation.h   140   0x7cd8554   
138   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_address>>,contact_address_county>::init   QxSqlRelation.h   121   0x7cd6692   
139   qx::QxSqlRelation<boost::shared_ptr<contact_address_county>,contact_address>::isValid_SqlRelation   QxSqlRelation.h   140   0x7c49c34   
140   qx::QxSqlRelation<boost::shared_ptr<contact_address_county>,contact_address>::init   QxSqlRelation.h   121   0x7c3e5b2   
141   qx::QxSqlRelation<boost::shared_ptr<contact_address>,customer_main_record>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fa3ce4   
142   qx::QxSqlRelation<boost::shared_ptr<contact_address>,customer_main_record>::init   QxSqlRelation.h   121   0x7f9a592   
143   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,customer_job>::isValid_SqlRelation   QxSqlRelation.h   140   0x7f2e744   
144   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,customer_job>::init   QxSqlRelation.h   121   0x7f2b8a2   
145   qx::QxSqlRelation<boost::shared_ptr<customer_job>,customer_action>::isValid_SqlRelation   QxSqlRelation.h   140   0x7e436b4   
146   qx::QxSqlRelation<boost::shared_ptr<customer_job>,customer_action>::init   QxSqlRelation.h   121   0x7e3a9e2   
147   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action>>,customer_job>::isValid_SqlRelation   QxSqlRelation.h   140   0x7f2e564   
148   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_action>>,customer_job>::init   QxSqlRelation.h   121   0x7f2b102   
149   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_job>>,customer_main_record>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fa3834   
150   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_job>>,customer_main_record>::init   QxSqlRelation.h   121   0x7f99282   
151   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,customer_association>::isValid_SqlRelation   QxSqlRelation.h   140   0x7f0b894   
152   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,customer_association>::init   QxSqlRelation.h   121   0x7f09d12   
153   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_association>>,customer_main_record>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fa3744   
154   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<customer_association>>,customer_main_record>::init   QxSqlRelation.h   121   0x7f98eb2   
155   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,contact_link>::isValid_SqlRelation   QxSqlRelation.h   140   0x7d83aa4   
156   qx::QxSqlRelation<boost::shared_ptr<customer_main_record>,contact_link>::init   QxSqlRelation.h   121   0x7d7f332   
157   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_link>>,customer_main_record>::isValid_SqlRelation   QxSqlRelation.h   140   0x7fa3654   
158   qx::QxSqlRelation<qx::QxCollection<long,boost::shared_ptr<contact_link>>,customer_main_record>::init   QxSqlRelation.h   121   0x7f98ae2   
159   qx::QxSqlQueryBuilder<std::shared_ptr<customer_main_record>>::isValid_SqlRelation   QxSqlQueryBuilder.h   288   0xa10acf0   
160   qx::QxSqlQueryBuilder<std::shared_ptr<customer_main_record>>::init   QxSqlQueryBuilder.h   270   0xa101d34   
161   qx::dao::detail::IxDao_Helper::init   IxDao_Helper.cpp   270   0x77d346a4   
162   qx::dao::detail::QxDao_Helper_Container<qx::QxCollection<long,std::shared_ptr<customer_main_record>>>::QxDao_Helper_Container<qx::QxCollection<long,std::shared_ptr<customer_main_record>>>   QxDao_Helper_Container.inl   97   0xa0dbf90   
163   qx::dao::detail::QxDao_FetchAll_Container<qx::QxCollection<long,std::shared_ptr<customer_main_record>>>::fetchAll   QxDao_FetchAll.inl   69   0xa0f1108   
164   qx::dao::detail::QxDao_FetchAll<qx::QxCollection<long,std::shared_ptr<customer_main_record>>>::fetchAll   QxDao_FetchAll.inl   125   0xa0f1015   
165   qx::dao::fetch_all<qx::QxCollection<long,std::shared_ptr<customer_main_record>>>   QxDao.h   633   0xa0caf4a   
166   services::customer_main_record_services::fetchAll_   customer_main_record.services.gen.cpp   133   0xa0bf770   
167   boost::_mfi::mf0<void,services::customer_main_record_services>::operator()   mem_fn_template.hpp   50   0xa0e3c71   
168   boost::detail::function::function_void_mem_invoker1<void (__thiscall services::customer_main_record_services:: *)(void),void,services::customer_main_record_services *>::invoke   function_template.hpp   232   0xa1077d4   
169   boost::function1<void,services::customer_main_record_services *>::operator()   function_template.hpp   771   0xa0e3c1a   
170   qx::QxFunction_0<services::customer_main_record_services,void>::QxInvokerFct<QString,0>::invoke   QxFunction_0.h   76   0xa10713d   
171   qx::QxFunction_0<services::customer_main_record_services,void>::invoke   QxFunction_0.h   62   0xa106ab9   
172   qx::QxClassX::invokeVoidPtr   QxClassX.cpp   176   0x77ce8afa   
173   qx::QxClassX::invoke_default<qx::service::IxService>::invoke   QxClassX.h   171   0x77daf418   
174   qx::QxClassX::invoke<qx::service::IxService>   QxClassX.h   142   0x77dabe38   
175   qx::service::QxTransaction::executeServer   QxTransaction.cpp   76   0x77daa29d   
176   qx::service::QxThread::doProcess   QxThread.cpp   101   0x77d9ce38   
177   qx::service::QxThread::run   QxThread.cpp   76   0x77d9cb02   
178   QSortFilterProxyModel::mapToSource   Qt5Cored      0x66b033c5   
179   _callthreadstartex   threadex.c   376   0x532f3651   
180   _threadstartex   threadex.c   359   0x532f3861   
181   BaseThreadInitThunk   KERNEL32      0x75cf3744   
182   __RtlUserThreadStart   ntdll      0x771d9cd4   
183   _RtlUserThreadStart   ntdll      0x771d9c9f   
SteveW
 
Posts: 53
Joined: Tue Jan 19, 2016 4:12 pm

Re: Duplicate keys during QxSqlRelation::init

Postby qxorm » Thu Feb 04, 2016 5:43 pm

When you push the button "Start Server" (so plugins are already loaded), could you try to add this line of code please :
Code: Select all
qx::QxClassX::registerAllClasses();


This function will register all classes in QxOrm context.
Do you have the same assert calling this function ?
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Duplicate keys during QxSqlRelation::init

Postby SteveW » Thu Feb 04, 2016 9:09 pm

Hi,

I am being moved onto other development for a while so I wont be able to follow this thread up as smoothly as I'd like. Please don't forget this thread ;) I will reply with further information when I can...

Steve.
SteveW
 
Posts: 53
Joined: Tue Jan 19, 2016 4:12 pm

Re: Duplicate keys during QxSqlRelation::init

Postby SteveW » Fri Feb 12, 2016 2:02 pm

Hi I am back on this...

I added the call to registerAllClasses which seem to execute ok (no crashes or assertions), but I still get the same assertion when the server is invoking the fetch_all service in response to the client's request.

Thanks
Steve.
SteveW
 
Posts: 53
Joined: Tue Jan 19, 2016 4:12 pm

Re: Duplicate keys during QxSqlRelation::init

Postby qxorm » Fri Feb 12, 2016 6:24 pm

Hello,

It looks like a similar issue than in the french forum, here is a link : http://www.developpez.net/forums/d14740 ... ost7994416
I don't know if you understand french (or maybe use Google Translation or whatever).

But it is strange because I think I fixed this issue.
It was a DLL problem when entities and services are not defined in the same DLL (I think there was not problem on Linux with *.SO shared libraries).

Anyway, what you could try is this part of the french forum (http://www.developpez.net/forums/d14740 ... ost7995400) :

The idea is to merge entities and services in the same DLL :
1- do a clean of your project + delete all makefiles previously generated by qmake ;
2- in your file "./services/custom/yourproject.services.pri", add this (replace Lima by your project name) :
Code: Select all
## -- Put your custom code here -- ##
 
DEFINES += _BUILDING_LIMACORE
 
include($$PWD/../../limaCore/LimaCore.gen.pri)
 
CONFIG(debug, debug|release) {
LIBS -= -l"LimaCored"
} else {
LIBS -= -l"LimaCore"
} # CONFIG(debug, debug|release)

3- in your pro project file :
Code: Select all
CONFIG(debug, debug|release) {
TARGET = LIMAClientd
LIBS += -l"QxOrmd"
LIBS += -l"LimaCoreServicesClientd"
#LIBS += -l"LimaCored"
} else {
TARGET = LIMAClient
LIBS += -l"QxOrm"
LIBS += -l"LimaCoreServicesClient"
#LIBS += -l"LimaCore"
} # CONFIG(debug, debug|release)
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Duplicate keys during QxSqlRelation::init

Postby SteveW » Tue Feb 16, 2016 4:32 pm

Hello,

Sorry this took a while to reply back, I had some issues building/config (not helped by the fact that depending on what you change in the PRO/PRI files, QMake does not always rebuild the Makefiles, even after a Clean All, I discoverd that the Makefiles need to be manually deleted to be certain).

Unfortunately once I got a fully building set of components it has not solved my original problem.

I did a full Dependency check on the EXE and DLL's and there is now no references to the original Entities project, it's source code is fully embedded into the ClientService and the ServerService projects, and I made sure I deleted all traces of the old Entities .DLL so it could not be picked up by "accident".

I get the same assertion I originally reported when the Server is executing the "fetchAll" service.

Steve.
SteveW
 
Posts: 53
Joined: Tue Jan 19, 2016 4:12 pm

Re: Duplicate keys during QxSqlRelation::init

Postby qxorm » Tue Feb 16, 2016 6:11 pm

Unfortunately once I got a fully building set of components it has not solved my original problem.

I think I need to reproduce your issue to be able to help you.
Could you please send me your qxee project file ?
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: Duplicate keys during QxSqlRelation::init

Postby SteveW » Wed Feb 17, 2016 1:03 pm

Hi, Which email address?

Thanks, Steve.
SteveW
 
Posts: 53
Joined: Tue Jan 19, 2016 4:12 pm

Re: Duplicate keys during QxSqlRelation::init

Postby SteveW » Wed Feb 17, 2016 4:13 pm

Hi again,

I have sent the QxEE project to contact@qxorm.com

Steve
SteveW
 
Posts: 53
Joined: Tue Jan 19, 2016 4:12 pm

Next

Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 9 guests