From info at peredin.com Fri Nov 1 11:32:11 2013 From: info at peredin.com (Per Edin) Date: Fri Nov 1 11:32:20 2013 Subject: [odb-users] ODB 2.3.0 and CMake Message-ID: Hi, Time is as usual limited but I have a new and updated version of my CMake module for ODB in the pipeline. Due to the 2.3.0 release of ODB I have to make a few changes to it (new features, renamed options, etc). If some of you are using my module I'd appreciate a short mail and I'll prioritize updating it! :) / Per From ensoreus at mail.ru Mon Nov 4 03:25:58 2013 From: ensoreus at mail.ru (Philipp Maluta) Date: Mon Nov 4 03:27:36 2013 Subject: [odb-users] Sqlite and foreign key exception Message-ID: <6B3426D8-B4E4-464A-9F7E-03C51230CD93@mail.ru> Hello, Boris. I have some trouble with the subj - my app using sqlite and bidirectional relationships. class TagEntity; class NoteEntity; typedef std::vector > tags; typedef std::vector > notes; ? #pragma db object class NoteEntity { private: NoteEntity(){} friend class odb::access; #pragma db id auto type("INTEGER") unsigned long _id; ... #pragma db value_not_null unordered tags_type _tags; }; #pragma db object class TagEntity { ? private: TagEntity(){} friend class odb::access; #pragma db id auto type("INTEGER") unsigned long _id; ... #pragma db value_not_null inverse(_tags) notes_type _notes; }; So, I?m considered the foreign key bug and it?s workaround you suggests but it still not work. I?m using database.hxx from examples and even made some mark { connection_ptr c (db->connection ()); qDebug() << "forein key ..."; c->execute ("PRAGMA foreign_keys=OFF"); transaction t (c->begin ()); schema_catalog::create_schema (*db); t.commit (); c->execute ("PRAGMA foreign_keys=ON"); } But the output is ./rpersistant --create --database notes.db forein key ... 19: foreign key constraint failed Would you like to provide some help, I found odb extremely cool and useful but the problem really gets me down. Thank you very much, Boris and your team. Philipp From lidia at lemur-soft.com Mon Nov 4 04:07:57 2013 From: lidia at lemur-soft.com (Lidia Kalinovsky) Date: Mon Nov 4 04:08:04 2013 Subject: [odb-users] bug in Android Message-ID: Hello I suspect there is some bug that happens on Android ( ok in Windows). I got exception 14: unable to open database file if 2 updates are called sequentially in one transaction. ( problem is in journal file locking, i guess...) Could you advice, please ? ( erase/persist does work, but it is not option for us, unfortunately :( ). Also, I believe, opening/commit transaction is slower than doing everything in one transaction. Please fix me if I am wrong. Thanks. Lidia. Code fragment is following: LOG("SyncManager::FullSync()->","test"); std::shared_ptr testDB = DBHelper::CreateDatabase(fullDatabasePath+"_1.sqlite",true); std::shared_ptr a(new Agent()); std::shared_ptr b(new Agent()); a->setWrntyID(25); b->setWrntyID(20); LOG("SyncManager::FullSync()->","before 2 persist in one transaction"); odb::transaction testTrans (testDB->begin()); testDB->persist(a); testDB->persist(b); testTrans.commit(); LOG("SyncManager::FullSync()->","after 2 persist in one transaction"); a->setAccountStatus(1); b->setAccountStatus(1); odb::transaction testTrans1 (testDB->begin()); LOG("SyncManager::FullSync()->","before 1 updates in one transaction"); testDB->update(a); testTrans1.commit(); odb::transaction testTrans2 (testDB->begin()); LOG("SyncManager::FullSync()->","before 1 updates in one transaction"); testDB->update(b); testTrans2.commit(); LOG("SyncManager::FullSync()->","before 2 updates in one transaction"); try { odb::transaction testTrans1 (testDB->begin()); a->setAccountStatus(2); b->setAccountStatus(2); testDB->update(a); testDB->update(b); testTrans1.commit(); } catch(odb::exception& e) { LOG("SyncManager::FullSync()->","exception from 2 updates in one transaction"); } -- Software integration and outsourcing services, Lemur-Soft, Giv'at Nili Israel, 37825 Phone : (+972) 545748325 Fax : (+972) 775345383 Email : lidia@lemur-soft.com Web: www.lemur-soft.com From lidia at lemur-soft.com Wed Nov 6 01:23:08 2013 From: lidia at lemur-soft.com (Lidia Kalinovsky) Date: Wed Nov 6 01:23:14 2013 Subject: [odb-users] Re: bug in Android In-Reply-To: References: Message-ID: Hello Boris, Do you have some update for this issue ? Thanks in advance Lidia. On Mon, Nov 4, 2013 at 11:07 AM, Lidia Kalinovsky wrote: > Hello > > I suspect there is some bug that happens on Android ( ok in Windows). > I got exception > > 14: unable to open database file > > if 2 updates are called sequentially in one transaction. > ( problem is in journal file locking, i guess...) > > Could you advice, please ? > ( erase/persist does work, but it is not option for us, unfortunately :( ). > Also, I believe, opening/commit transaction is slower than doing > everything in one transaction. > Please fix me if I am wrong. > > Thanks. > Lidia. > > Code fragment is following: > > LOG("SyncManager::FullSync()->","test"); > std::shared_ptr testDB = > DBHelper::CreateDatabase(fullDatabasePath+"_1.sqlite",true); > std::shared_ptr a(new Agent()); > std::shared_ptr b(new Agent()); > a->setWrntyID(25); > b->setWrntyID(20); > LOG("SyncManager::FullSync()->","before 2 persist in one transaction"); > odb::transaction testTrans (testDB->begin()); > testDB->persist(a); > testDB->persist(b); > testTrans.commit(); > LOG("SyncManager::FullSync()->","after 2 persist in one transaction"); > a->setAccountStatus(1); > b->setAccountStatus(1); > > odb::transaction testTrans1 (testDB->begin()); > LOG("SyncManager::FullSync()->","before 1 updates in one transaction"); > testDB->update(a); > testTrans1.commit(); > > odb::transaction testTrans2 (testDB->begin()); > LOG("SyncManager::FullSync()->","before 1 updates in one transaction"); > testDB->update(b); > testTrans2.commit(); > LOG("SyncManager::FullSync()->","before 2 updates in one transaction"); > try > { > odb::transaction testTrans1 (testDB->begin()); > a->setAccountStatus(2); > b->setAccountStatus(2); > testDB->update(a); > testDB->update(b); > testTrans1.commit(); > } > catch(odb::exception& e) > { > LOG("SyncManager::FullSync()->","exception from 2 updates in one > transaction"); > } > > > -- > Software integration and outsourcing services, > Lemur-Soft, Giv'at Nili > Israel, 37825 > Phone : (+972) 545748325 > Fax : (+972) 775345383 > Email : lidia@lemur-soft.com > Web: www.lemur-soft.com > -- Software integration and outsourcing services, Lemur-Soft, Giv'at Nili Israel, 37825 Phone : (+972) 545748325 Fax : (+972) 775345383 Email : lidia@lemur-soft.com Web: www.lemur-soft.com From boris at codesynthesis.com Wed Nov 6 10:36:28 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Nov 6 10:38:53 2013 Subject: [odb-users] bug in Android In-Reply-To: References: Message-ID: Hi Lidia, Lidia Kalinovsky writes: > I suspect there is some bug that happens on Android ( ok in Windows). So is it Android or Windows? Does the same code work fine on other platforms? > if 2 updates are called sequentially in one transaction. > ( problem is in journal file locking, i guess...) I don't think so since a transaction with a single update works fine. Can you also try to run just the transaction with two updates and without any of the preceeding transactions? Boris From boris at codesynthesis.com Thu Nov 7 00:53:19 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Nov 7 00:55:43 2013 Subject: [odb-users] Sqlite and foreign key exception In-Reply-To: <6B3426D8-B4E4-464A-9F7E-03C51230CD93@mail.ru> References: <6B3426D8-B4E4-464A-9F7E-03C51230CD93@mail.ru> Message-ID: Hi Philipp, Philipp Maluta writes: Add the following extra print statements and see what the output is. I suspect you get the error somewhere further down your code and not in this fragment: > { > connection_ptr c (db->connection ()); > qDebug() << "forein key ..."; > > c->execute ("PRAGMA foreign_keys=OFF"); > > transaction t (c->begin ()); > schema_catalog::create_schema (*db); > t.commit (); qDebug() << "schema created"; > c->execute ("PRAGMA foreign_keys=ON"); qDebug() << "foreign keys enabled"; > } Can you also show the ODB command line that you use to compile your object model? Boris From thalerbenedek at gmail.com Thu Nov 7 14:48:54 2013 From: thalerbenedek at gmail.com (Thaler Benedek) Date: Thu Nov 7 23:15:46 2013 Subject: [odb-users] Error in documentation: --input-name instead of --output-name Message-ID: Hi, In the ODB documentation[0] at the end of section: 6.3 Circular Relationships: odb ... --generate-schema-only --at-once* --input-name* company \ position.hxx employee.hxx Works for me only if I specify --output-name: odb ... --generate-schema-only --at-once *--output-name* company \ position.hxx employee.hxx Love your product and the extensive docs, keep up the good work, Thaler, Benedek [0]: http://www.codesynthesis.com/products/odb/doc/manual.xhtml#6.3 From ensoreus at mail.ru Thu Nov 7 02:54:24 2013 From: ensoreus at mail.ru (Philipp Maluta) Date: Thu Nov 7 23:18:55 2013 Subject: [odb-users] Sqlite and foreign key exception In-Reply-To: References: <6B3426D8-B4E4-464A-9F7E-03C51230CD93@mail.ru> Message-ID: <19CA2B77-67D4-4C0A-9AEB-8D24C07E265A@mail.ru> Privet, Boris! Thank you for reply. I use the following command for ODB odb --database sqlite --generate-schema --generate-query --generate-session Note.h In file included from /Library/Frameworks/QtCore.framework/Headers/qnamespace.h:45:0, from /Library/Frameworks/QtCore.framework/Headers/qobjectdefs.h:45, from /Library/Frameworks/QtCore.framework/Headers/qobject.h:47, from /Library/Frameworks/QtCore.framework/Headers/qabstracteventdispatcher.h:45, from /Library/Frameworks/QtCore.framework/Headers/QtCore:3, from Note.h:8: /Library/Frameworks/QtCore.framework/Headers/qglobal.h:331:6: warning: #warning "This version of Mac OS X is unsupported" [-Wcpp] I'm using no profile(of course I prefer qt-profile but I want lo localize the bug and try to build prototype with no profiles at all) I added a lines you provided and: ./rpersistant --create --database notes.db forein key ... schema created foreign keys enabled 19: foreign key constraint failed I?m using the Per Edin?s recommendations for ODB configuration in .pro file. I can send all the prototype project - it?s as simple as your samples - just a few files. If there is still lack of info, would you like to browse over the sources. I?m really need your help. Thanks. 7 ????. 2013, ? 07:53, Boris Kolpackov ???????(?): > Hi Philipp, > > Philipp Maluta writes: > > Add the following extra print statements and see what the output is. > I suspect you get the error somewhere further down your code and not > in this fragment: > >> { >> connection_ptr c (db->connection ()); >> qDebug() << "forein key ..."; >> >> c->execute ("PRAGMA foreign_keys=OFF"); >> >> transaction t (c->begin ()); >> schema_catalog::create_schema (*db); >> t.commit (); > > qDebug() << "schema created"; > >> c->execute ("PRAGMA foreign_keys=ON"); > > qDebug() << "foreign keys enabled"; > >> } > > Can you also show the ODB command line that you use to compile your > object model? > > Boris > From boris at codesynthesis.com Fri Nov 8 02:17:56 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Nov 8 02:20:20 2013 Subject: [odb-users] Error in documentation: --input-name instead of --output-name In-Reply-To: References: Message-ID: Hi Thaler, Thaler Benedek writes: > odb ... --generate-schema-only --at-once* --input-name* company \ > position.hxx employee.hxx > > Works for me only if I specify --output-name: > > odb ... --generate-schema-only --at-once *--output-name* company \ > position.hxx employee.hxx You are probably using ODB 2.2.0. In 2.3.0, this option has been renamed (citing the NEWS file): * The --output-name option has been renamed to --input-name, which is more semantically correct. > Love your product and the extensive docs, > keep up the good work, Thanks, I am glad you are enjoying it. Boris From boris at codesynthesis.com Fri Nov 8 02:22:06 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Nov 8 02:24:30 2013 Subject: [odb-users] Sqlite and foreign key exception In-Reply-To: <19CA2B77-67D4-4C0A-9AEB-8D24C07E265A@mail.ru> References: <6B3426D8-B4E4-464A-9F7E-03C51230CD93@mail.ru> <19CA2B77-67D4-4C0A-9AEB-8D24C07E265A@mail.ru> Message-ID: Hi Philipp, Philipp Maluta writes: > I added a lines you provided and: > ./rpersistant --create --database notes.db > forein key ... > schema created > foreign keys enabled > 19: foreign key constraint failed Which confirms my suspicion: the exception is thrown by some other code in your application. Try to find out which transaction causes it (the exception will be thrown from commit()). Then make sure all the objects that you point to are actually made persistent. The common cause of the foreign key exception is forgetting to call persist() for the other end of the relationship (or calling it in incorrect order if you use auto ids). Boris From mabowen at lexmark.com Fri Nov 8 14:21:01 2013 From: mabowen at lexmark.com (Matthew Bowen) Date: Sat Nov 9 06:07:40 2013 Subject: [odb-users] Specifying "--profile boost" after "--default-pointer" resets the default pointer to boost::shared_ptr Message-ID: Hi! I am currently using ODB's compiler version 2.3.0. I've found that, when specifying parameters, if I specify "--profile boost" after specifying "--default-pointer std::shared_ptr," the compiler will ignore my request to set the default to std::shared_ptr, and use boost::shared_ptr instead. However, if I specify the default after setting the profile to Boost, the compiler will respect the default I set. For example, using the following command results in ODB using boost::shared_ptr by default (not intended): odb --default-pointer std::shared_ptr --profile boost The following results in ODB using std::shared_ptr by default (as intended): odb --profile boost --default-pointer std::shared_ptr Obviously not critical, because the workaround is simple, but I'm not sure if this is intended behavior. Thanks! Matthew Bowen From boris at codesynthesis.com Sun Nov 10 02:38:27 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sun Nov 10 02:40:51 2013 Subject: [odb-users] Specifying "--profile boost" after "--default-pointer" resets the default pointer to boost::shared_ptr In-Reply-To: References: Message-ID: Hi Matthew, Matthew Bowen writes: > I am currently using ODB's compiler version 2.3.0. I've found that, when > specifying parameters, if I specify "--profile boost" after specifying > "--default-pointer std::shared_ptr," the compiler will ignore my request to > set the default to std::shared_ptr, and use boost::shared_ptr instead. > However, if I specify the default after setting the profile to Boost, the > compiler will respect the default I set. Yes, this behavior is documented in Section 23.1, "Smart Pointers Library". Though I agree it can be a bit surprising and perhaps this wasn't such a good idea seeing that the C++11 (and std::shared_ptr) use is becoming more widespread. I've added a TODO item to change this for the next release. Boris From mabowen at lexmark.com Sun Nov 10 18:42:45 2013 From: mabowen at lexmark.com (Matthew Bowen) Date: Mon Nov 11 01:25:08 2013 Subject: [odb-users] Specifying "--profile boost" after "--default-pointer" resets the default pointer to boost::shared_ptr In-Reply-To: References: Message-ID: Boris, Ah, sorry about that; I probably should have scanned the manual first! But yes, I do believe it's somewhat unintuitive. Thanks very much for the prompt reply! On Sun, Nov 10, 2013 at 2:38 AM, Boris Kolpackov wrote: > Hi Matthew, > > Matthew Bowen writes: > > > I am currently using ODB's compiler version 2.3.0. I've found that, when > > specifying parameters, if I specify "--profile boost" after specifying > > "--default-pointer std::shared_ptr," the compiler will ignore my request > to > > set the default to std::shared_ptr, and use boost::shared_ptr instead. > > However, if I specify the default after setting the profile to Boost, the > > compiler will respect the default I set. > > Yes, this behavior is documented in Section 23.1, "Smart Pointers Library". > Though I agree it can be a bit surprising and perhaps this wasn't such a > good idea seeing that the C++11 (and std::shared_ptr) use is becoming > more widespread. I've added a TODO item to change this for the next > release. > > Boris > From chalathip at gmail.com Sun Nov 10 23:45:26 2013 From: chalathip at gmail.com (Chalathip Thumkanon) Date: Mon Nov 11 01:25:09 2013 Subject: [odb-users] Minor bug in odb-examples-2.3.0 Message-ID: Hi I am quite new to odb. My build system is Mingw32 on XP. When I tried to run 'make check' in odb-examples-2.3.0, one of the tests failed as shown. FAIL: ../../tester ============================================ 1 of 1 test failed Please report to odb-users@codesynthesis.com ============================================ make[3]: *** [check-TESTS] Error 1 make[3]: Leaving directory `/home/Me/odb-examples-2.3.0/inheritance/reuse' make[2]: *** [check-am] Error 2 make[2]: Leaving directory `/home/Me/odb-examples-2.3.0/inheritance/reuse' make[1]: *** [check] Error 2 make[1]: Leaving directory `/home/Me/odb-examples-2.3.0/inheritance/reuse' make: *** [check-recursive] Error 1 However, I found that the test is actually passed, no exception is caught. The problem is that in every "driver.cxx", there is no "return 0;" statement in main function. This allows the test to return a random value which "make" interprets it as an error. Anyway, it's just a minor bug since most of the time it returns 0 (not so randomly). Thank you very much for your great opensource software. Sincerely Yours, Chalathip. From boris at codesynthesis.com Mon Nov 11 01:29:03 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Nov 11 01:31:27 2013 Subject: [odb-users] Minor bug in odb-examples-2.3.0 In-Reply-To: References: Message-ID: Hi Chalathip, Chalathip Thumkanon writes: > However, I found that the test is actually passed, no exception is caught. > The problem is that in every "driver.cxx", there is no "return 0;" > statement in main function. The standard behavior for main() is to return 0 if there is no explicit return statement. So I doubt it is that. Can you try to run the example manually and see if you can get any additional clues as to why it is failing? Maybe it is the schema creation part that fails? > Thank you very much for your great opensource software. You are welcome. I am glad you are enjoying it! Boris From chalathip at gmail.com Tue Nov 12 22:15:03 2013 From: chalathip at gmail.com (Chalathip Thumkanon) Date: Tue Nov 12 22:15:11 2013 Subject: [odb-users] Minor bug in odb-examples-2.3.0 In-Reply-To: References: Message-ID: On Mon, Nov 11, 2013 at 1:29 PM, Boris Kolpackov wrote: > Hi Chalathip, > > Chalathip Thumkanon writes: > > > However, I found that the test is actually passed, no exception is > caught. > > The problem is that in every "driver.cxx", there is no "return 0;" > > statement in main function. > > The standard behavior for main() is to return 0 if there is no explicit > return statement. So I doubt it is that. Can you try to run the example > manually and see if you can get any additional clues as to why it is > failing? Maybe it is the schema creation part that fails? > > Yes, your are right. It's my fault not being aware of changing of this behavior in current c++ standard. When I run 'make check', many tests pass. The 'polymorphism/reuse' test fails, with no further information (from exception catching). And when I modified the main function for this only test to explicitly return 0, every test works fine. After receiving your mail, I undo my changing and run 'make check' again. Every test passes including that one. I tried to generate the same error, but I can't. It's so weird. > > Thank you very much for your great opensource software. > > You are welcome. I am glad you are enjoying it! > > Boris > Thank you very much for your help. Sincerely Yours, Chalathip From boris at codesynthesis.com Wed Nov 13 00:52:42 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Nov 13 00:55:06 2013 Subject: [odb-users] Minor bug in odb-examples-2.3.0 In-Reply-To: References: Message-ID: Hi Chalathip, Chalathip Thumkanon writes: > After receiving your mail, I undo my changing and run 'make check' again. > Every test passes including that one. I tried to generate the same error, > but I can't. It's so weird. Try to delete the database file (odb-test.db) and re-run the tests. I suspect this has something to do with the database schema creation. Boris From grosr.romain at gmail.com Thu Nov 14 12:03:28 2013 From: grosr.romain at gmail.com (Romain Gros) Date: Thu Nov 14 13:08:29 2013 Subject: [odb-users] Composite object id with a to-many relationship Message-ID: Hi ! I have been working on a problem for a little while and I can't find the answer to that. Here's the thing: I have a class, ObjectInstance, with a vector of ObjectSpecification. Here are the definitions of the classes: /// ObjectInstance.hxx # pragma db object class ObjectInstance { public: typedef std::vector > ObjectSpecificationType; private: # pragma db id auto int _idobjectinstance; # pragma db value_not_null inverse(_instance) ObjectSpecificationType _specifications; /** getter/setter, etc. **/ }; /// ObjectSpecification.hxx # pragma db value class ObjectSpecificationId { private: int _idinstance; int _idspecification; }; # pragma db object class ObjectSpecification { private: # pragma db id column("") ObjectSpecificationId _idobjectspecification; int _value; # pragma db not_null column("idinstance") std::shared_ptr _instance; /** getter/setter, etc. **/ }; Basically, what I wanted to have, is the following mechanism: my ObjectInstance has multiple ObjectSpecification. We know that the ObjectSpecification is related to an ObjectInstance because the ObjectSpecificationId::_idinstance is equal to ObjectInstance::_idinstance. That's what I want for the load of an ObjectInstance. The fact is that I cannot specify, in the inverse pragma member, something like that: inverse(_idobjectspecification._idinstance), which would be perfect for me. To simulate the fact that we can access the ObjectSpecificationId::_idinstance, I use a reference to the ObjectInstance in the ObjectSpecification (as shown above). The thing work well for the load, but with that, I cannot insert new ObjectSpecification, because the persist_statement generated defines two times the idinstance and cause an MySQL error: "INSERT INTO `ObjectSpecification` " "(`idinstance`, " "`idspecification`, " "`value`, " "`idinstance`) " "VALUES " "(?, ?, ?, ?)"; Do you know a good way to do that ? Did I miss something with the composite object ids that would allow me to do what I want ? Also, a solution that I didn't try yet is the use of the post_load callback, but if I do that, I'm afraid that I won't be able to use lazy_ptr, right ? Thanks a lot, Romain From boris at codesynthesis.com Fri Nov 15 03:49:07 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Fri Nov 15 03:51:31 2013 Subject: [odb-users] Composite object id with a to-many relationship In-Reply-To: References: Message-ID: Hi Romain, Romain Gros writes: > The fact is that I cannot specify, in the inverse pragma member, something > like that: inverse(_idobjectspecification._idinstance), which would be > perfect for me. Conceptually, what you are trying to do is use a foreign key as part of the primary key, or, in ODB terms, use an object pointer as part of an object id: #pragma db value class ObjectSpecificationId { private: std::shared_ptr _idinstance; int _idspecification; }; ODB currently does not support this and I am not sure we will support it in the future because of the extra complexity involved. > To simulate the fact that we can access the > ObjectSpecificationId::_idinstance, I use a reference to the ObjectInstance > in the ObjectSpecification (as shown above). > The thing work well for the load, but with that, I cannot insert new > ObjectSpecification, because the persist_statement generated defines two > times the idinstance and cause an MySQL error: > "INSERT INTO `ObjectSpecification` " > "(`idinstance`, " > "`idspecification`, " > "`value`, " > "`idinstance`) " > "VALUES " > "(?, ?, ?, ?)"; Right. You basically mapped two data members to the same column, which won't work. > Do you know a good way to do that? I think the best way is to keep it simple and just duplicate the ObjectInstance id in both the ObjectSpecification id and the pointer. You will incur a small overhead by storing the same value in two columns, but other than that, things will be nice and simple. > Also, a solution that I didn't try yet is the use of the post_load > callback, but if I do that, I'm afraid that I won't be able to use > lazy_ptr, right ? No, this won't work because of the inverse() pragma in ObjectInstance. Also, another thing that you may consider is making ObjectSpecification a value, rather than an object. If you look at the table structure you are trying to achieve, it is pretty much the same as what you get with a container: #pragma db value class ObjectSpecification { int _value; }; #pragma db object class ObjectInstance { typedef std::vector ObjectSpecificationType; ObjectSpecificationType _specifications; }; Here the container's index becomes _idspecification. If you want to make it lazy-loaded, you can put it in a section (ODB 2.3.0). Boris From grosr.romain at gmail.com Fri Nov 15 22:11:49 2013 From: grosr.romain at gmail.com (Romain Gros) Date: Sat Nov 16 00:20:24 2013 Subject: [odb-users] Composite object id with a to-many relationship In-Reply-To: References: Message-ID: Hi Boris, Thank you for your answer, it works perfectly ! Romain 2013/11/15 Boris Kolpackov > Hi Romain, > > Romain Gros writes: > > > The fact is that I cannot specify, in the inverse pragma member, > something > > like that: inverse(_idobjectspecification._idinstance), which would be > > perfect for me. > > Conceptually, what you are trying to do is use a foreign key as part > of the primary key, or, in ODB terms, use an object pointer as part > of an object id: > > #pragma db value > class ObjectSpecificationId > { > private: > std::shared_ptr _idinstance; > int _idspecification; > }; > > ODB currently does not support this and I am not sure we will support > it in the future because of the extra complexity involved. > > > > To simulate the fact that we can access the > > ObjectSpecificationId::_idinstance, I use a reference to the > ObjectInstance > > in the ObjectSpecification (as shown above). > > The thing work well for the load, but with that, I cannot insert new > > ObjectSpecification, because the persist_statement generated defines two > > times the idinstance and cause an MySQL error: > > "INSERT INTO `ObjectSpecification` " > > "(`idinstance`, " > > "`idspecification`, " > > "`value`, " > > "`idinstance`) " > > "VALUES " > > "(?, ?, ?, ?)"; > > Right. You basically mapped two data members to the same column, which > won't work. > > > > Do you know a good way to do that? > > I think the best way is to keep it simple and just duplicate the > ObjectInstance id in both the ObjectSpecification id and the > pointer. You will incur a small overhead by storing the same > value in two columns, but other than that, things will be nice > and simple. > > > > Also, a solution that I didn't try yet is the use of the post_load > > callback, but if I do that, I'm afraid that I won't be able to use > > lazy_ptr, right ? > > No, this won't work because of the inverse() pragma in ObjectInstance. > > Also, another thing that you may consider is making ObjectSpecification > a value, rather than an object. If you look at the table structure you > are trying to achieve, it is pretty much the same as what you get with a > container: > > #pragma db value > class ObjectSpecification > { > int _value; > }; > > > #pragma db object > class ObjectInstance > { > typedef std::vector ObjectSpecificationType; > > ObjectSpecificationType _specifications; > }; > > Here the container's index becomes _idspecification. If you want to > make it lazy-loaded, you can put it in a section (ODB 2.3.0). > > Boris > From ensoreus at mail.ru Tue Nov 19 02:21:11 2013 From: ensoreus at mail.ru (Philipp Maluta) Date: Tue Nov 19 02:21:22 2013 Subject: [odb-users] Sqlite and foreign key exception In-Reply-To: References: <6B3426D8-B4E4-464A-9F7E-03C51230CD93@mail.ru> <19CA2B77-67D4-4C0A-9AEB-8D24C07E265A@mail.ru> Message-ID: Hello, Boris! Thank your for your attention, you are really helped me. The bug was in the DB fulfilling. So another trouble came up. I have a code like this shared_ptr tag1( new TagEntity("tag1", "common1") ); shared_ptr tag2( new TagEntity("tag2", "common1") ); shared_ptr note1( new NoteEntity("vis1", "text1", "acts1") ); shared_ptr note2( new NoteEntity("vis2", "text2", "acts2") ); note1->get_tags().push_back(tag1); note1->get_tags().push_back(tag2); note2->get_tags().push_back(tag2); tag1->get_notes().push_back(note1); tag2->get_notes().push_back(note1); tag2->get_notes().push_back(note2); odb::transaction t( db->begin() ); db->persist(tag1); db->persist(tag2); db->persist(note1); db->persist(note2); t.commit(); But how do you think, what this error message means? /opt/local/include/odb/database.ixx:106:27: error: no viable conversion from 'const shared_ptr' to 'const object_pointer' (aka 'NoteEntity *const') const object_pointer& pobj (p); ^ ~ /opt/local/include/odb/database.ixx:131:12: note: in instantiation of function template specialization 'odb::database::persist' requested here return persist (cr); ^ ../rpersistant/main.cpp:51:9: note: in instantiation of function template specialization 'odb::database::persist' requested here db->persist(note1); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/tr1/boost_shared_ptr.h:678:7: note: candidate function operator __unspecified_bool_type() const // never throws 8 ????. 2013, ? 09:22, Boris Kolpackov ???????(?): > Hi Philipp, > > Philipp Maluta writes: > >> I added a lines you provided and: >> ./rpersistant --create --database notes.db >> forein key ... >> schema created >> foreign keys enabled >> 19: foreign key constraint failed > > Which confirms my suspicion: the exception is thrown by some other > code in your application. > > Try to find out which transaction causes it (the exception will be > thrown from commit()). Then make sure all the objects that you > point to are actually made persistent. The common cause of the > foreign key exception is forgetting to call persist() for the > other end of the relationship (or calling it in incorrect order > if you use auto ids). > > Boris > From ensoreus at mail.ru Tue Nov 19 03:27:52 2013 From: ensoreus at mail.ru (Philipp Maluta) Date: Tue Nov 19 03:28:05 2013 Subject: [odb-users] Sqlite and foreign key exception In-Reply-To: References: <6B3426D8-B4E4-464A-9F7E-03C51230CD93@mail.ru> <19CA2B77-67D4-4C0A-9AEB-8D24C07E265A@mail.ru> Message-ID: <203BCFD8-8C35-4848-8487-22CCB6F54709@mail.ru> Wow, sorry, I missed up the --default-pointer std::tr1::shared_ptr --table-prefix inverse_ $< options in odd compiler's line Now compiles fine. thx Thank for your great work. Wish it become more and more popular hence its awesome. 19 ????. 2013, ? 09:21, Philipp Maluta ???????(?): > Hello, Boris! > Thank your for your attention, you are really helped me. > The bug was in the DB fulfilling. > > So another trouble came up. > I have a code like this > shared_ptr tag1( new TagEntity("tag1", "common1") ); > shared_ptr tag2( new TagEntity("tag2", "common1") ); > > shared_ptr note1( new NoteEntity("vis1", "text1", "acts1") ); > shared_ptr note2( new NoteEntity("vis2", "text2", "acts2") ); > > note1->get_tags().push_back(tag1); > note1->get_tags().push_back(tag2); > note2->get_tags().push_back(tag2); > > tag1->get_notes().push_back(note1); > tag2->get_notes().push_back(note1); > tag2->get_notes().push_back(note2); > > odb::transaction t( db->begin() ); > > db->persist(tag1); > db->persist(tag2); > > db->persist(note1); > db->persist(note2); > > t.commit(); > > > But how do you think, what this error message means? > /opt/local/include/odb/database.ixx:106:27: error: no viable conversion from 'const shared_ptr' to 'const object_pointer' (aka 'NoteEntity *const') > const object_pointer& pobj (p); > ^ ~ > /opt/local/include/odb/database.ixx:131:12: note: in instantiation of function template specialization 'odb::database::persist' requested here > return persist (cr); > ^ > ../rpersistant/main.cpp:51:9: note: in instantiation of function template specialization 'odb::database::persist' requested here > db->persist(note1); > ^ > /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/tr1/boost_shared_ptr.h:678:7: note: candidate function > operator __unspecified_bool_type() const // never throws > > > 8 ????. 2013, ? 09:22, Boris Kolpackov ???????(?): > >> Hi Philipp, >> >> Philipp Maluta writes: >> >>> I added a lines you provided and: >>> ./rpersistant --create --database notes.db >>> forein key ... >>> schema created >>> foreign keys enabled >>> 19: foreign key constraint failed >> >> Which confirms my suspicion: the exception is thrown by some other >> code in your application. >> >> Try to find out which transaction causes it (the exception will be >> thrown from commit()). Then make sure all the objects that you >> point to are actually made persistent. The common cause of the >> foreign key exception is forgetting to call persist() for the >> other end of the relationship (or calling it in incorrect order >> if you use auto ids). >> >> Boris >> > > From pengqiang1979 at gmail.com Tue Nov 19 10:38:49 2013 From: pengqiang1979 at gmail.com (qiang peng) Date: Tue Nov 19 10:38:56 2013 Subject: [odb-users] how to implement application session? Message-ID: Hi Boris. I need a application session in my program, but can't find a reasonable solution. Can you help me? Thanks! Best regrads, Qiang Peng From mike.ruffing at ipconfigure.com Tue Nov 19 13:38:54 2013 From: mike.ruffing at ipconfigure.com (Mike Ruffing) Date: Tue Nov 19 14:26:24 2013 Subject: [odb-users] Native SQL Query Message-ID: Boris, I'm trying to compile (VS2012) the following code (copied from the ODB Manual Section 4, ODB 2.3.0) query q ("first = 'John' AND age = " + query::_ref (age)); I'm getting the following compiler error: error C2678: binary '+' : no operator found which takes a left-hand operand of type 'const char [26]' Is there an ODB compiler option I'm missing/including? I do have the -generate-query option set. Thanks, Mike From boris at codesynthesis.com Tue Nov 19 14:26:55 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Nov 19 14:29:19 2013 Subject: [odb-users] how to implement application session? In-Reply-To: References: Message-ID: Hi Qiang, qiang peng writes: > I need a application session in my program, but can't find a reasonable > solution. The term "application session" can mean many different things, but perhaps the mechanism you are looking for is described in Section 11.2, "Custom Sessions" in the ODB manual. Boris From boris at codesynthesis.com Tue Nov 19 14:35:25 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Nov 19 14:37:50 2013 Subject: [odb-users] Native SQL Query In-Reply-To: References: Message-ID: Hi Mike, Mike Ruffing writes: > query q ("first = 'John' AND age = " + query::_ref (age)); > > error C2678: binary '+' : no operator found which takes a left-hand > operand of type 'const char [26]' We have pretty much the same line in one of the tests and it compiles fine. What is the 'query' type? You should have something like this before the above line: typedef odb::query query; Boris From pengqiang1979 at gmail.com Tue Nov 19 20:37:32 2013 From: pengqiang1979 at gmail.com (qiang peng) Date: Tue Nov 19 20:37:40 2013 Subject: [odb-users] how to implement application session? In-Reply-To: References: Message-ID: Hi, Boris In fact, need a seesion which life as long as application program's life, so can use cached object. 2013/11/20 Boris Kolpackov > Hi Qiang, > > qiang peng writes: > > > I need a application session in my program, but can't find a > reasonable > > solution. > > The term "application session" can mean many different things, but > perhaps the mechanism you are looking for is described in Section > 11.2, "Custom Sessions" in the ODB manual. > > Boris > From mike.ruffing at ipconfigure.com Tue Nov 19 14:49:08 2013 From: mike.ruffing at ipconfigure.com (Mike Ruffing) Date: Tue Nov 19 23:57:16 2013 Subject: [odb-users] Native SQL Query In-Reply-To: References: Message-ID: <6e4e3c177f0a4b8d8f452b13183f0441@BY2PR04MB095.namprd04.prod.outlook.com> Boris, Thanks for the quick response. Here is the exact query instantiation with the object type: odb::query q ("first = 'John' AND age = " + odb::query::_ref (age)); I have also included the server object declaration. #pragma db object //! @brief Persistent class for an ESM server. class server : public std::enable_shared_from_this { public: server(const std::string& name, const boost::uuids::uuid& uuid) : name_(name), uuid_(uuid) {} ~server() {} ////////////////////////////////////////////////////////////////////////////// // Setters & getters: ////////////////////////////////////////////////////////////////////////////// const std::string& name() const { return name_; } void name(const std::string& name) { name_ = name; } const boost::uuids::uuid& uuid() const { return uuid_; } const std::vector< ::odb::lazy_weak_ptr >& cameras() const { return cameras_; } const std::vector< ::odb::lazy_weak_ptr >& storage_locations() const { return storage_locations_; } const unsigned long id() const { return server_id_; } ////////////////////////////////////////////////////////////////////////////// // Bidirectional adders: ////////////////////////////////////////////////////////////////////////////// void add_storage_location(std::shared_ptr& new_storage_location); void add_camera(std::shared_ptr& new_camera); private: friend class ::odb::access; server() {} server(const server& b_server) {}; ////////////////////////////////////////////////////////////////////////////// // Data members: ////////////////////////////////////////////////////////////////////////////// //! @brief Server ID, auto-assigned. #pragma db id auto unsigned long server_id_; //! @brief Server name, i.e. "Cort's ESM server". #pragma db not_null std::string name_; //!< @brief Server UUID, retained by a server identify itself in a shared database. #pragma db not_null boost::uuids::uuid uuid_; //!< @brief List of active and inactive storage locations on this server. #pragma db value_not_null inverse(server_) std::vector< ::odb::lazy_weak_ptr > storage_locations_; //!< @brief List of active and inactive cameras on this server. #pragma db value_not_null inverse(server_) std::vector< ::odb::lazy_weak_ptr > cameras_; }; -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Tuesday, November 19, 2013 2:35 PM To: Mike Ruffing Cc: odb-users@codesynthesis.com Subject: Re: [odb-users] Native SQL Query Hi Mike, Mike Ruffing writes: > query q ("first = 'John' AND age = " + query::_ref (age)); > > error C2678: binary '+' : no operator found which takes a left-hand > operand of type 'const char [26]' We have pretty much the same line in one of the tests and it compiles fine. What is the 'query' type? You should have something like this before the above line: typedef odb::query query; Boris From dagrawal at infinio.com Tue Nov 19 19:36:13 2013 From: dagrawal at infinio.com (Devesh Agrawal) Date: Tue Nov 19 23:57:16 2013 Subject: [odb-users] Tracing sql statements using ODB 2.2 with Sqlite 3.7 Message-ID: Hi, I am trying to trace the sql statements being executed using the db::tracer(odb::tracer&) api. I want to know the actual values inserted or updated after the statement is fully bound. That is I don't want to trace 'Insert into X values (?, ?, ?)'. I would rather want to trace 'insert into X values ('foo', 'bar', 'baz') Thanks. From boris at codesynthesis.com Wed Nov 20 04:52:25 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Nov 20 04:54:49 2013 Subject: [odb-users] how to implement application session? In-Reply-To: References: Message-ID: Hi Qiang, qiang peng writes: > In fact, need a seesion which life as long as application program's life, > so can use cached object. If your application is single-threaded, then you can use ODB's stock session for that. For a multi-threaded application you will have to implement your own thread-safe object cache as described in Section 11.2. Boris From boris at codesynthesis.com Wed Nov 20 04:59:49 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Nov 20 05:02:13 2013 Subject: [odb-users] Tracing sql statements using ODB 2.2 with Sqlite 3.7 In-Reply-To: References: Message-ID: Hi Devesh, Devesh Agrawal writes: > I am trying to trace the sql statements being executed using the > db::tracer(odb::tracer&) api. I want to know the actual values inserted or > updated after the statement is fully bound. > > That is I don't want to trace 'Insert into X values (?, ?, ?)'. I would > rather want to trace 'insert into X values ('foo', 'bar', 'baz') This is not possible with the ODB tracer API since that would be very heavy-weight both in terms of the implementation and runtime overhead. However, SQLite provides its own tracing support with the sqlite_trace() API. And I believe in recent versions of SQLite this will include actual values (what it will print if you persist, say, a 1Mb BLOB I don't know). The following earlier post explains how you can enable SQLite-level tracing with ODB: http://www.codesynthesis.com/pipermail/odb-users/2011-October/000322.html Boris From boris at codesynthesis.com Wed Nov 20 05:12:16 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Nov 20 05:14:40 2013 Subject: [odb-users] Native SQL Query In-Reply-To: <6e4e3c177f0a4b8d8f452b13183f0441@BY2PR04MB095.namprd04.prod.outlook.com> References: <6e4e3c177f0a4b8d8f452b13183f0441@BY2PR04MB095.namprd04.prod.outlook.com> Message-ID: Hi Mike, Ok, I am pretty sure I know what's going on: you are using dynamic multi-database support which does not support parameter binding in native queries. Citing Section 16.2, "Dynamic Multi-Database Support": "... Because of this database system-independent representation, dynamic support queries have a number of limitations. Specifically, dynamic queries do not support parameter binding in native query fragments." Then it continues: "... switching from dynamic to static mode can be an effective way to overcome these limitations..." And shows an example of how to "switch-down" to static support in order to execute a native query. Also, generally speaking, running native queries in multi-database mode will in most cases require doing it on the per-database basis since things like SQL syntax, name/string quoting , etc., vary from database to database. Boris From mike.ruffing at ipconfigure.com Wed Nov 20 08:36:50 2013 From: mike.ruffing at ipconfigure.com (Mike Ruffing) Date: Wed Nov 20 09:52:48 2013 Subject: [odb-users] Native SQL Query In-Reply-To: References: <6e4e3c177f0a4b8d8f452b13183f0441@BY2PR04MB095.namprd04.prod.outlook.com> Message-ID: Boris, We are using dynamic multi-database support and that was the issue. Thanks for the update and reference. Mike -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Wednesday, November 20, 2013 5:12 AM To: Mike Ruffing Cc: odb-users@codesynthesis.com Subject: Re: [odb-users] Native SQL Query Hi Mike, Ok, I am pretty sure I know what's going on: you are using dynamic multi-database support which does not support parameter binding in native queries. Citing Section 16.2, "Dynamic Multi-Database Support": "... Because of this database system-independent representation, dynamic support queries have a number of limitations. Specifically, dynamic queries do not support parameter binding in native query fragments." Then it continues: "... switching from dynamic to static mode can be an effective way to overcome these limitations..." And shows an example of how to "switch-down" to static support in order to execute a native query. Also, generally speaking, running native queries in multi-database mode will in most cases require doing it on the per-database basis since things like SQL syntax, name/string quoting , etc., vary from database to database. Boris From chezgi at yahoo.com Sun Nov 24 23:29:14 2013 From: chezgi at yahoo.com (abbas ali chezgi) Date: Sun Nov 24 23:29:21 2013 Subject: [odb-users] bug with Qt 5.2.0-beta In-Reply-To: <1385296872.90603.YahooMailNeo@web121301.mail.ne1.yahoo.com> References: <1385296872.90603.YahooMailNeo@web121301.mail.ne1.yahoo.com> Message-ID: <1385353754.62786.YahooMailNeo@web121306.mail.ne1.yahoo.com> On Sunday, November 24, 2013 4:11 PM, abbas ali chezgi wrote: odb compiler dos'nt work with Qt5.2.0. 1- create simple config.h file with one class?? <-- it compiles and works good 2- add "#include " to Config.h????? <--? it dos'nt compile (error logs in attached file) it's first error comes from qvariant.h: ??? #if QT_DEPRECATED_SINCE(5, 0) -------------- next part -------------- In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1:0, from Config.h:6: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:820:24: error: missing binary operator before token "(" In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1:0, from Config.h:6: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:114:92: error: ???IsPointerToTypeDerivedFromQObject??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:114:127: error: expected primary-expression before ???>??? token In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1:0, from Config.h:6: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:114:128: error: ???Value??? in namespace ???::??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:120:12: error: ???TreatAsQObjectBeforeMetaType??? is not a template /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:131:19: error: ???UnknownType??? is not a member of ???QMetaType??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:159:29: error: ???QRegularExpression??? is not a member of ???QMetaType??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:162:16: error: ???QUuid??? is not a member of ???QMetaType??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:163:22: error: ???QModelIndex??? is not a member of ???QMetaType??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:187:20: error: ???QPolygonF??? is not a member of ???QMetaType??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:252:20: error: ???QModelIndex??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:252:33: error: ISO C++ forbids declaration of ???modelIndex??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:253:20: error: ???QJsonValue??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:253:32: error: ISO C++ forbids declaration of ???jsonValue??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:253:5: error: ???QVariant::QVariant(const int&)??? cannot be overloaded /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:252:5: error: with ???QVariant::QVariant(const int&)??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:254:20: error: ???QJsonObject??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:254:33: error: ISO C++ forbids declaration of ???jsonObject??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:254:5: error: ???QVariant::QVariant(const int&)??? cannot be overloaded /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:252:5: error: with ???QVariant::QVariant(const int&)??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:255:20: error: ???QJsonArray??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:255:32: error: ISO C++ forbids declaration of ???jsonArray??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:255:5: error: ???QVariant::QVariant(const int&)??? cannot be overloaded /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:252:5: error: with ???QVariant::QVariant(const int&)??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:256:20: error: ???QJsonDocument??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:256:35: error: ISO C++ forbids declaration of ???jsonDocument??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:256:5: error: ???QVariant::QVariant(const int&)??? cannot be overloaded /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:252:5: error: with ???QVariant::QVariant(const int&)??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:325:5: error: ???QModelIndex??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:326:5: error: ???QJsonValue??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:327:5: error: ???QJsonObject??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:328:5: error: ???QJsonArray??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:329:5: error: ???QJsonDocument??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:466:27: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:466:29: error: ???Q_DECL_EQ_DELETE??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:473:29: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:473:31: error: ???Q_DECL_EQ_DELETE??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:480:29: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:480:31: error: ???Q_DECL_EQ_DELETE??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:481:28: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:481:30: error: ???Q_DECL_EQ_DELETE??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:482:26: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:482:28: error: ???Q_DECL_EQ_DELETE??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:483:29: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:483:31: error: ???Q_DECL_EQ_DELETE??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h: In member function ???bool QVariant::isDetached() const???: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:543:45: error: ???class QAtomicInt??? has no member named ???load??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h: At global scope: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:577:5: error: ???QtMetaTypePrivate??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:582:9: error: ???QtMetaTypePrivate??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:39: error: ???QtMetaTypePrivate??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:82: error: expected unqualified-id before ???&??? token /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:82: error: expected ???)??? before ???&??? token /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:58: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:83: error: ISO C++ forbids declaration of ???impl??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:89: error: ISO C++ forbids declaration of ???QAtomicInt??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:89: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:89: error: declaration of ???int QSequentialIterable::const_iterator::QAtomicInt??? [-fpermissive] In file included from /usr/include/QtCore/qbytearray.h:45:0, from /usr/include/QtCore/qstring.h:46, from /usr/include/QtCore/QString:1, from /usr/libexec/odb/i686-linux-gnu/bin/../lib/gcc/../../include/odb/qt/basic/sqlite/default-mapping.hxx:8, from :1: /usr/include/QtCore/qatomic.h:55:21: error: changes meaning of ???QAtomicInt??? from ???class QAtomicInt??? [-fpermissive] In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1:0, from Config.h:6: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:101: error: ISO C++ forbids declaration of ???ref_??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:101: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:587:105: error: expected unqualified-id before ???)??? token /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:613:34: error: ???QtMetaTypePrivate??? has not been declared /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:613:77: error: expected ???)??? before ???impl??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:626:5: error: ???QtMetaTypePrivate??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:631:9: error: ???QtMetaTypePrivate??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:39: error: ???QtMetaTypePrivate??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:83: error: expected unqualified-id before ???&??? token /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:83: error: expected ???)??? before ???&??? token /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:58: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:84: error: ISO C++ forbids declaration of ???impl??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:90: error: ISO C++ forbids declaration of ???QAtomicInt??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:90: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:90: error: declaration of ???int QAssociativeIterable::const_iterator::QAtomicInt??? [-fpermissive] In file included from /usr/include/QtCore/qbytearray.h:45:0, from /usr/include/QtCore/qstring.h:46, from /usr/include/QtCore/QString:1, from /usr/libexec/odb/i686-linux-gnu/bin/../lib/gcc/../../include/odb/qt/basic/sqlite/default-mapping.hxx:8, from :1: /usr/include/QtCore/qatomic.h:55:21: error: changes meaning of ???QAtomicInt??? from ???class QAtomicInt??? [-fpermissive] In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1:0, from Config.h:6: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:102: error: ISO C++ forbids declaration of ???ref_??? with no type [-fpermissive] /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:102: error: expected ???;??? at end of member declaration /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:636:106: error: expected unqualified-id before ???)??? token /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:665:35: error: ???QtMetaTypePrivate??? has not been declared /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:665:79: error: expected ???)??? before ???impl??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h: In static member function ???static T QtPrivate::QVariantValueHelper::object(const QVariant&)???: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:693:36: error: ???typeFlags??? is not a member of ???QMetaType??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:693:73: error: ???PointerToQObject??? is not a member of ???QMetaType??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h: In static member function ???static QSequentialIterable QtPrivate::QVariantValueHelperInterface::invoke(const QVariant&)???: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:710:45: error: ???QVariantList??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:710:59: error: no matching function for call to ???qMetaTypeId()??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:710:59: note: candidate is: In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:48:0, from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1, from Config.h:6: /usr/include/QtCore/qmetatype.h:224:12: note: template int qMetaTypeId(T*) /usr/include/QtCore/qmetatype.h:224:12: note: template argument deduction/substitution failed: In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1:0, from Config.h:6: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:710:59: error: template argument 1 is invalid /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:711:44: error: ???QtMetaTypePrivate??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:714:44: error: ???QtMetaTypePrivate??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:716:48: error: ???QtMetaTypePrivate??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:716:42: error: parse error in template argument list /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:716:92: error: no matching function for call to ???QVariant::value() const??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:716:92: note: candidate is: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:347:14: note: template T QVariant::value() const /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:347:14: note: template argument deduction/substitution failed: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:716:92: error: template argument 1 is invalid /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h: In static member function ???static QAssociativeIterable QtPrivate::QVariantValueHelperInterface::invoke(const QVariant&)???: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:724:45: error: ???QVariantMap??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:724:58: error: no matching function for call to ???qMetaTypeId()??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:724:58: note: candidate is: In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:48:0, from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1, from Config.h:6: /usr/include/QtCore/qmetatype.h:224:12: note: template int qMetaTypeId(T*) /usr/include/QtCore/qmetatype.h:224:12: note: template argument deduction/substitution failed: In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1:0, from Config.h:6: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:724:58: error: template argument 1 is invalid /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:725:45: error: ???QtMetaTypePrivate??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:727:45: error: ???QVariantHash??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:727:59: error: no matching function for call to ???qMetaTypeId()??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:727:59: note: candidate is: In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:48:0, from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1, from Config.h:6: /usr/include/QtCore/qmetatype.h:224:12: note: template int qMetaTypeId(T*) /usr/include/QtCore/qmetatype.h:224:12: note: template argument deduction/substitution failed: In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1:0, from Config.h:6: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:727:59: error: template argument 1 is invalid /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:728:45: error: ???QtMetaTypePrivate??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:730:49: error: ???QtMetaTypePrivate??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:730:43: error: parse error in template argument list /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:730:94: error: no matching function for call to ???QVariant::value() const??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:730:94: note: candidate is: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:347:14: note: template T QVariant::value() const /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:347:14: note: template argument deduction/substitution failed: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:730:94: error: template argument 1 is invalid /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h: At global scope: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:734:41: error: ???QVariantList??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:734:53: error: template argument 1 is invalid /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:750:41: error: ???QVariantHash??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:750:53: error: template argument 1 is invalid /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:766:41: error: ???QVariantMap??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:766:52: error: template argument 1 is invalid /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h: In static member function ???static QPair QtPrivate::QVariantValueHelperInterface >::invoke(const QVariant&)???: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:788:17: error: ???hasRegisteredConverterFunction??? is not a member of ???QMetaType??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:788:85: error: ???QtMetaTypePrivate??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:788:73: error: parse error in template argument list /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:788:131: error: no matching function for call to ???qMetaTypeId()??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:788:131: note: candidate is: In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:48:0, from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1, from Config.h:6: /usr/include/QtCore/qmetatype.h:224:12: note: template int qMetaTypeId(T*) /usr/include/QtCore/qmetatype.h:224:12: note: template argument deduction/substitution failed: In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1:0, from Config.h:6: /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:788:131: error: template argument 1 is invalid /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:789:17: error: ???QtMetaTypePrivate??? is not a class or namespace /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:789:62: error: expected ???;??? before ???pi??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:791:23: error: ???QtMetaTypePrivate??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:792:29: error: ???d1??? was not declared in this scope /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:796:23: error: ???QtMetaTypePrivate??? does not name a type /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:797:29: error: ???d2??? was not declared in this scope In file included from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:48:0, from /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/QVariant:1, from Config.h:6: /usr/include/QtCore/qmetatype.h: In instantiation of ???static int QMetaTypeId2::qt_metatype_id() [with T = QPair]???: /usr/include/QtCore/qmetatype.h:230:44: required from ???int qMetaTypeId(T*) [with T = QPair]??? /home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore/qvariant.h:785:73: required from here /usr/include/QtCore/qmetatype.h:169:80: error: ???qt_metatype_id??? is not a member of ???QMetaTypeId >??? From danny.m.gale at gmail.com Sun Nov 24 15:00:10 2013 From: danny.m.gale at gmail.com (Danny Gale) Date: Sun Nov 24 23:35:45 2013 Subject: [odb-users] Toolchain issue with Qt 5.1.1 and odb Message-ID: Hi, Let me start by saying that odb seems to be the most extensive and easiest to integrate ORM solution for C++. I'm excited to have these capabilities without having to write SQL myself. I'm trying to get odb integrated into my Qt Creator 2.8.1 (using Qt 5.1.1) build chain. Qt Creator has found the headers (I followed the instructions here: http://wiki.codesynthesis.com/Using_ODB_with_Qt_Creator_on_Linux) but when make calls odb, I get: odb --database sqlite --profile qt --generate-schema --generate-query --generate-session -I/Users/galed/Qt5.1.1/5.1.1/clang_64/include -I/Users/galed/Qt5.1.1/5.1.1/clang_64/include/ -I/usr/local/include/ ../../daedal/PCB/pcblayer.h make[1]: odb: No such file or directory ODB was configured and make'd in /opt/odb-2.3.0-i686-macosx. My path is: GALED:~ galed$ echo $PATH /Applications/microchip/xc32/v1.00/bin:/Applications/microchip/xc32/v1.00/bin:/Users/galed/Documents/Programming/lib/xerces-c-3.1.1-x86-macosx-gcc-4.0:/opt/local/bin:/opt/local/sbin:/opt/local/lib:/opt/local/share:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/usr/local/CrossPack-AVR/bin:/usr/local/bin:/usr/local/bin:/usr/local/bin:/opt/odb-2.3.0-i686-macosx/bin/ and GALED:~ galed$ odb --version ODB object-relational mapping (ORM) compiler for C++ 2.3.0 Copyright (c) 2009-2013 Code Synthesis Tools CC This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. GALED:~ galed$ which odb /opt/odb-2.3.0-i686-macosx/bin//odb Why is Qt Creator (or, more specifically, make as called from Qt Creator) not finding the odb executable? What is the soluction to this? Thanks for your help. Looking forward to using odb to extend my Qt applications, Danny Gale danny.m.gale@gmail.com From chezgi at yahoo.com Mon Nov 25 00:43:12 2013 From: chezgi at yahoo.com (abbas ali chezgi) Date: Mon Nov 25 00:43:19 2013 Subject: [odb-users] Toolchain issue with Qt 5.1.1 and odb In-Reply-To: <1385356072.853.YahooMailNeo@web121305.mail.ne1.yahoo.com> References: <1385356072.853.YahooMailNeo@web121305.mail.ne1.yahoo.com> Message-ID: <1385358192.34536.YahooMailNeo@web121306.mail.ne1.yahoo.com> qtcreator has it's "Build Environment". set PATH variable in qtcreator.??? projetcs-->your kit-->build-->Build Environment On Monday, November 25, 2013 8:08 AM, Danny Gale wrote: Hi, Let me start by saying that odb seems to be the most extensive and easiest to integrate ORM solution for C++. I'm excited to have these capabilities without having to write SQL myself. I'm trying to get odb integrated into my Qt Creator 2.8.1 (using Qt 5.1.1) build chain. Qt Creator has found the headers (I followed the instructions here: http://wiki.codesynthesis.com/Using_ODB_with_Qt_Creator_on_Linux) but when make calls odb, I get: odb --database sqlite --profile qt --generate-schema --generate-query --generate-session -I/Users/galed/Qt5.1.1/5.1.1/clang_64/include -I/Users/galed/Qt5.1.1/5.1.1/clang_64/include/ -I/usr/local/include/ ../../daedal/PCB/pcblayer.h make[1]: odb: No such file or directory ODB was configured and make'd in /opt/odb-2.3.0-i686-macosx. My path is: GALED:~ galed$ echo $PATH /Applications/microchip/xc32/v1.00/bin:/Applications/microchip/xc32/v1.00/bin:/Users/galed/Documents/Programming/lib/xerces-c-3.1.1-x86-macosx-gcc-4.0:/opt/local/bin:/opt/local/sbin:/opt/local/lib:/opt/local/share:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/usr/local/CrossPack-AVR/bin:/usr/local/bin:/usr/local/bin:/usr/local/bin:/opt/odb-2.3.0-i686-macosx/bin/ and GALED:~ galed$ odb --version ODB object-relational mapping (ORM) compiler for C++ 2.3.0 Copyright (c) 2009-2013 Code Synthesis Tools CC This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. GALED:~ galed$ which odb /opt/odb-2.3.0-i686-macosx/bin//odb Why is Qt Creator (or, more specifically, make as called from Qt Creator) not finding the odb executable? What is the soluction to this? Thanks for your help. Looking forward to using odb to extend my Qt applications, Danny Gale danny.m.gale@gmail.com From boris at codesynthesis.com Mon Nov 25 01:31:33 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Nov 25 01:33:56 2013 Subject: [odb-users] bug with Qt 5.2.0-beta In-Reply-To: <1385353754.62786.YahooMailNeo@web121306.mail.ne1.yahoo.com> References: <1385296872.90603.YahooMailNeo@web121301.mail.ne1.yahoo.com> <1385353754.62786.YahooMailNeo@web121306.mail.ne1.yahoo.com> Message-ID: Hi, abbas ali chezgi writes: > odb compiler dos'nt work with Qt5.2.0. > > it's first error comes from qvariant.h: > #if QT_DEPRECATED_SINCE(5, 0) It looks like QT_DEPRECATED_SINCE is not defined for some reason when compiling a Qt header with the ODB compiler. I found only one mentioning of something similar but I don't see how this can be related: http://qt-project.org/forums/viewthread/28482 Have you tried to compile a source file that includes QVariant with g++ instead of ODB? If it works, then perhaps an include directory is mission from the ODB command line. In fact, can you show the exact ODB command line that you are using? Also it would be useful to know if you built the ODB compiler yourself or if you are using one of the pre-built packages (and which version). Boris From boris at codesynthesis.com Mon Nov 25 02:54:20 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Nov 25 02:56:44 2013 Subject: [odb-users] Toolchain issue with Qt 5.1.1 and odb In-Reply-To: References: Message-ID: Hi Danny, Danny Gale writes: > GALED:~ galed$ echo $PATH > [...]:/opt/odb-2.3.0-i686-macosx/bin/ Setting PATH in a terminal or even in your .profile won't have any effect on programs that are started from the window manager's menu. To confirm this, you can try starting QtCreator manually from the terminal where you know PATH is correct. As for the solution, I think Abbas Ali's suggestion is probably the easiest way. Boris From chezgi at yahoo.com Mon Nov 25 04:14:39 2013 From: chezgi at yahoo.com (abbas ali chezgi) Date: Mon Nov 25 04:14:46 2013 Subject: [odb-users] bug with Qt 5.2.0-beta In-Reply-To: References: <1385296872.90603.YahooMailNeo@web121301.mail.ne1.yahoo.com> <1385353754.62786.YahooMailNeo@web121306.mail.ne1.yahoo.com> Message-ID: <1385370879.51219.YahooMailNeo@web121302.mail.ne1.yahoo.com> thanks for quick reply Boris i used prebuild odb: odb-2.3.0-1.i686.rpm and compiled libodb-qt with Qt5.2.0-beta odb command: //------------------------------------------------------------------------------------------- odb -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore -d sqlite --generate-query --generate-schema -p qt Config.h //------------------------------------------------------------------------------------------- sample header file: //------------------------------------------------------------------------------------------- #ifndef CONFIG_H #define CONFIG_H #include #include #include? #pragma db object class User { public: ??? #pragma db id auto ??? unsigned long id_; ??? QString name; ??? int sid; }; #endif // CONFIG_H //------------------------------------------------------------------------------------------- thanks again. On Monday, November 25, 2013 10:06 AM, Boris Kolpackov wrote: Hi, abbas ali chezgi writes: > odb compiler dos'nt work with Qt5.2.0. > > it's first error comes from qvariant.h: > #if QT_DEPRECATED_SINCE(5, 0) It looks like QT_DEPRECATED_SINCE is not defined for some reason when compiling a Qt header with the ODB compiler. I found only one mentioning of something similar but I don't see how this can be related: http://qt-project.org/forums/viewthread/28482 Have you tried to compile a source file that includes QVariant with g++ instead of ODB? If it works, then perhaps an include directory is mission from the ODB command line. In fact, can you show the exact ODB command line that you are using? Also it would be useful to know if you built the ODB compiler yourself or if you are using one of the pre-built packages (and which version). Boris From boris at codesynthesis.com Mon Nov 25 04:30:24 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Nov 25 04:32:48 2013 Subject: [odb-users] bug with Qt 5.2.0-beta In-Reply-To: <1385370879.51219.YahooMailNeo@web121302.mail.ne1.yahoo.com> References: <1385296872.90603.YahooMailNeo@web121301.mail.ne1.yahoo.com> <1385353754.62786.YahooMailNeo@web121306.mail.ne1.yahoo.com> <1385370879.51219.YahooMailNeo@web121302.mail.ne1.yahoo.com> Message-ID: Hi, abbas ali chezgi writes: > odb -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore ODB includes Qt headers with the QtCore prefix, for example: #include As a result, you need to also specify the "top-level" include directory for Qt with the -I option: odb -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore What most likely happens now is you get some headers from your Qt 5.2.0 beta and some from your default Qt installation. Not a good thing. If this help with the ODB compilation, I suggest that you also make sure that libodb-qt is built with both include directories. If this doesn't help, try to compile this test with g++ and see if you can make it work with Qt 5.2.0: #include #include #include int main () {} Boris From chezgi at yahoo.com Mon Nov 25 06:15:02 2013 From: chezgi at yahoo.com (abbas ali chezgi) Date: Mon Nov 25 06:15:09 2013 Subject: [odb-users] bug with Qt 5.2.0-beta In-Reply-To: References: <1385296872.90603.YahooMailNeo@web121301.mail.ne1.yahoo.com> <1385353754.62786.YahooMailNeo@web121306.mail.ne1.yahoo.com> <1385370879.51219.YahooMailNeo@web121302.mail.ne1.yahoo.com> Message-ID: <1385378102.963.YahooMailNeo@web121306.mail.ne1.yahoo.com> thanks Boris,problem solved. it seems that odb only needs QtCore is there any need to use module based includes? we can refactor Qt includes to simple case: ? QtCore/QString ---> QString thanks. On Monday, November 25, 2013 1:05 PM, Boris Kolpackov wrote: Hi, abbas ali chezgi writes: > odb -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore ODB includes Qt headers with the QtCore prefix, for example: #include As a result, you need to also specify the "top-level" include directory for Qt with the -I option: odb -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore What most likely happens now is you get some headers from your Qt 5.2.0 beta and some from your default Qt installation. Not a good thing. If this help with the ODB compilation, I suggest that you also make sure that libodb-qt is built with both include directories. If this doesn't help, try to compile this test with g++ and see if you can make it work with Qt 5.2.0: #include #include #include int main () {} Boris From info at peredin.com Mon Nov 25 07:02:27 2013 From: info at peredin.com (Per Edin) Date: Mon Nov 25 07:02:34 2013 Subject: [odb-users] bug with Qt 5.2.0-beta In-Reply-To: <1385378102.963.YahooMailNeo@web121306.mail.ne1.yahoo.com> References: <1385296872.90603.YahooMailNeo@web121301.mail.ne1.yahoo.com> <1385353754.62786.YahooMailNeo@web121306.mail.ne1.yahoo.com> <1385370879.51219.YahooMailNeo@web121302.mail.ne1.yahoo.com> <1385378102.963.YahooMailNeo@web121306.mail.ne1.yahoo.com> Message-ID: Hi Abbas, Although it may be possible to #include , I think it's best to stick with Qt Coding Conventions, which is to always do #include . See http://qt-project.org/wiki/Coding-Conventions#32bc73e08b315a2d85bfd10b2e8c867a /Per On Mon, Nov 25, 2013 at 12:15 PM, abbas ali chezgi wrote: > thanks Boris,problem solved. > it seems that odb only needs QtCore > is there any need to use module based includes? > we can refactor Qt includes to simple case: > QtCore/QString ---> QString > > thanks. > > > > > On Monday, November 25, 2013 1:05 PM, Boris Kolpackov wrote: > > Hi, > > abbas ali chezgi writes: > >> odb -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore > > ODB includes Qt headers with the QtCore prefix, for example: > > #include > > As a result, you need to also specify the "top-level" include > directory for Qt with the -I option: > > odb -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include -I/home/abbas/Qt5.2.0/5.2.0-beta1/gcc/include/QtCore > > What most likely happens now is you get some headers from your > Qt 5.2.0 beta and some from your default Qt installation. Not > a good thing. > > If this help with the ODB compilation, I suggest that you also > make sure that libodb-qt is built with both include directories. > > If this doesn't help, try to compile this test with g++ and see > if you can make it work with Qt 5.2.0: > > #include > #include > #include > int main () {} > > > Boris From boris at codesynthesis.com Mon Nov 25 07:01:07 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Nov 25 07:03:32 2013 Subject: [odb-users] bug with Qt 5.2.0-beta In-Reply-To: <1385378102.963.YahooMailNeo@web121306.mail.ne1.yahoo.com> References: <1385296872.90603.YahooMailNeo@web121301.mail.ne1.yahoo.com> <1385353754.62786.YahooMailNeo@web121306.mail.ne1.yahoo.com> <1385370879.51219.YahooMailNeo@web121302.mail.ne1.yahoo.com> <1385378102.963.YahooMailNeo@web121306.mail.ne1.yahoo.com> Message-ID: Hi, abbas ali chezgi writes: > it seems that odb only needs QtCore Yes, the ODB profile only deals with components from QtCore. > is there any need to use module based includes? While the Qt documentation does not recommend it explicitly, it appears to be more portable. For example, Qt4 packaged as a framework for OS X (and enabled with the -framework option) can only be included with the QtCore/ prefix. Plus if you look into the Qt's source code itself, they use the QtCore/ prefix as well. > we can refactor Qt includes to simple case: > QtCore/QString ---> QString Yes, you can use such "simple" includes in your application, but in the ODB code we have to use the module prefix. So, to summarize: 1. You always need to have the top-level Qt directory in your compiler's search path. 2. If in your application you include without the module prefix (e.g., ), you also need to add the module include path. Boris From lidia at lemur-soft.com Tue Nov 26 15:37:03 2013 From: lidia at lemur-soft.com (Lidia Kalinovsky) Date: Tue Nov 26 15:37:11 2013 Subject: [odb-users] in memory sqlite db Message-ID: Hello I would like to create in memory sqlite db and be able to grab the memory to stream. Is it possible with odb ? Thanks. Lidia. -- Software integration and outsourcing services, Lemur-Soft, Giv'at Nili Israel, 37825 Phone : (+972) 545748325 Fax : (+972) 775345383 Email : lidia@lemur-soft.com Web: www.lemur-soft.com From Hugo.Mildenberger at web.de Tue Nov 26 15:52:28 2013 From: Hugo.Mildenberger at web.de (Hugo.Mildenberger@web.de) Date: Tue Nov 26 15:52:42 2013 Subject: [odb-users] in memory sqlite db In-Reply-To: References: Message-ID: <20131126215228.4d9a079082c85605ae0995e0@zotac.lan> Hello Lidia, is there a special reason for not simply putting the sqlite db on a RAM disk (tmpfs, whatever)? Kind regards Hugo Mildenberger On Tue, 26 Nov 2013 22:37:03 +0200 Lidia Kalinovsky wrote: > Hello > > I would like to create in memory sqlite db and be able to grab the memory > to stream. > Is it possible with odb ? > > Thanks. > Lidia. > > -- > Software integration and outsourcing services, > Lemur-Soft, Giv'at Nili > Israel, 37825 > Phone : (+972) 545748325 > Fax : (+972) 775345383 > Email : lidia@lemur-soft.com > Web: www.lemur-soft.com -- From lidia at lemur-soft.com Tue Nov 26 16:27:35 2013 From: lidia at lemur-soft.com (Lidia Kalinovsky) Date: Tue Nov 26 16:27:41 2013 Subject: [odb-users] in memory sqlite db In-Reply-To: <20131126215228.4d9a079082c85605ae0995e0@zotac.lan> References: <20131126215228.4d9a079082c85605ae0995e0@zotac.lan> Message-ID: Hi Hugo, I guess it could be an option - should test what is the difference between saving huge db to file vs ram. Could you please explain me briefly ( or point to some documentation reference) how can I do it ? Thanks a lot, Lidia. On Tue, Nov 26, 2013 at 10:52 PM, wrote: > Hello Lidia, > > is there a special reason for not simply putting the sqlite db on a RAM > disk (tmpfs, whatever)? > > Kind regards > > Hugo Mildenberger > > On Tue, 26 Nov 2013 22:37:03 +0200 > Lidia Kalinovsky wrote: > > > Hello > > > > I would like to create in memory sqlite db and be able to grab the memory > > to stream. > > Is it possible with odb ? > > > > Thanks. > > Lidia. > > > > -- > > Software integration and outsourcing services, > > Lemur-Soft, Giv'at Nili > > Israel, 37825 > > Phone : (+972) 545748325 > > Fax : (+972) 775345383 > > Email : lidia@lemur-soft.com > > Web: www.lemur-soft.com > > > -- > > -- Software integration and outsourcing services, Lemur-Soft, Giv'at Nili Israel, 37825 Phone : (+972) 545748325 Fax : (+972) 775345383 Email : lidia@lemur-soft.com Web: www.lemur-soft.com From Hugo.Mildenberger at web.de Tue Nov 26 18:24:49 2013 From: Hugo.Mildenberger at web.de (Hugo.Mildenberger@web.de) Date: Tue Nov 26 18:25:03 2013 Subject: [odb-users] in memory sqlite db In-Reply-To: References: <20131126215228.4d9a079082c85605ae0995e0@zotac.lan> Message-ID: <20131127002449.65d039ac87abba42fb0a4432@zotac.lan> Lidia, I don't know what type of system you're running; presumably Windows? I do not use this system any more, but I know there are half a dozen third party drivers providing RAM disks (for free & phone home, if you don't mind). In the meantime I've learned that SQLLite actually provides memory mapping via its backup interface, so simply type "sqlite memory stream" into g**gle et voil?! The core functionality is here: http://www.sqlite.org/backup.html. Looks very simple and very clean. Kind regards Hugo Mildenberger On Tue, 26 Nov 2013 23:27:35 +0200 Lidia Kalinovsky wrote: > Hi Hugo, > > I guess it could be an option - should test what is the difference between > saving huge db to file vs ram. > Could you please explain me briefly ( or point to some documentation > reference) how can I do it ? > > Thanks a lot, > Lidia. > > > On Tue, Nov 26, 2013 at 10:52 PM, wrote: > > > Hello Lidia, > > > > is there a special reason for not simply putting the sqlite db on a RAM > > disk (tmpfs, whatever)? > > > > Kind regards > > > > Hugo Mildenberger > > > > On Tue, 26 Nov 2013 22:37:03 +0200 > > Lidia Kalinovsky wrote: > > > > > Hello > > > > > > I would like to create in memory sqlite db and be able to grab the memory > > > to stream. > > > Is it possible with odb ? > > > > > > Thanks. > > > Lidia. > > > > > > -- > > > Software integration and outsourcing services, > > > Lemur-Soft, Giv'at Nili > > > Israel, 37825 > > > Phone : (+972) 545748325 > > > Fax : (+972) 775345383 > > > Email : lidia@lemur-soft.com > > > Web: www.lemur-soft.com > > > > > > -- > > > > > > > -- > Software integration and outsourcing services, > Lemur-Soft, Giv'at Nili > Israel, 37825 > Phone : (+972) 545748325 > Fax : (+972) 775345383 > Email : lidia@lemur-soft.com > Web: www.lemur-soft.com -- From lidia at lemur-soft.com Wed Nov 27 00:07:29 2013 From: lidia at lemur-soft.com (Lidia Kalinovsky) Date: Wed Nov 27 00:07:37 2013 Subject: [odb-users] in memory sqlite db In-Reply-To: <20131127002449.65d039ac87abba42fb0a4432@zotac.lan> References: <20131126215228.4d9a079082c85605ae0995e0@zotac.lan> <20131127002449.65d039ac87abba42fb0a4432@zotac.lan> Message-ID: thanks a lot. Lidia. On Wed, Nov 27, 2013 at 1:24 AM, wrote: > Lidia, > > I don't know what type of system you're running; presumably Windows? I do > not use this system any more, but I know there are half a dozen third > party drivers providing RAM disks (for free & phone home, if you don't > mind). > > In the meantime I've learned that SQLLite actually provides memory mapping > via its backup interface, so simply type "sqlite memory stream" into g**gle > et voil?! The core functionality is here: > http://www.sqlite.org/backup.html. > Looks very simple and very clean. > > Kind regards > > Hugo Mildenberger > > On Tue, 26 Nov 2013 23:27:35 +0200 > Lidia Kalinovsky wrote: > > > Hi Hugo, > > > > I guess it could be an option - should test what is the difference > between > > saving huge db to file vs ram. > > Could you please explain me briefly ( or point to some documentation > > reference) how can I do it ? > > > > Thanks a lot, > > Lidia. > > > > > > On Tue, Nov 26, 2013 at 10:52 PM, wrote: > > > > > Hello Lidia, > > > > > > is there a special reason for not simply putting the sqlite db on a RAM > > > disk (tmpfs, whatever)? > > > > > > Kind regards > > > > > > Hugo Mildenberger > > > > > > On Tue, 26 Nov 2013 22:37:03 +0200 > > > Lidia Kalinovsky wrote: > > > > > > > Hello > > > > > > > > I would like to create in memory sqlite db and be able to grab the > memory > > > > to stream. > > > > Is it possible with odb ? > > > > > > > > Thanks. > > > > Lidia. > > > > > > > > -- > > > > Software integration and outsourcing services, > > > > Lemur-Soft, Giv'at Nili > > > > Israel, 37825 > > > > Phone : (+972) 545748325 > > > > Fax : (+972) 775345383 > > > > Email : lidia@lemur-soft.com > > > > Web: www.lemur-soft.com > > > > > > > > > -- > > > > > > > > > > > > -- > > Software integration and outsourcing services, > > Lemur-Soft, Giv'at Nili > > Israel, 37825 > > Phone : (+972) 545748325 > > Fax : (+972) 775345383 > > Email : lidia@lemur-soft.com > > Web: www.lemur-soft.com > > > -- > > -- Software integration and outsourcing services, Lemur-Soft, Giv'at Nili Israel, 37825 Phone : (+972) 545748325 Fax : (+972) 775345383 Email : lidia@lemur-soft.com Web: www.lemur-soft.com From boris at codesynthesis.com Wed Nov 27 06:38:49 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Nov 27 06:41:14 2013 Subject: [odb-users] in memory sqlite db In-Reply-To: References: Message-ID: Hi Lidia, Lidia Kalinovsky writes: > I would like to create in memory sqlite db and be able to grab the memory > to stream. As Hugo suggested, the best way is to use the SQLite backup API. To use this API you will need to get the raw SQLite handle for the database. Here is how you can do it: odb::sqlite::database db (...); odb::sqlite::connection_ptr c (db.connection ()); sqlite3* h (c->handle ()); // Valid until connection goes out of scope. Boris From pengqiang1979 at gmail.com Thu Nov 28 09:30:07 2013 From: pengqiang1979 at gmail.com (qiang peng) Date: Thu Nov 28 09:30:14 2013 Subject: [odb-users] how to implement application session? In-Reply-To: References: Message-ID: OK, Thanks! 2013/11/20 Boris Kolpackov > Hi Qiang, > > qiang peng writes: > > > In fact, need a seesion which life as long as application program's life, > > so can use cached object. > > If your application is single-threaded, then you can use ODB's stock > session for that. For a multi-threaded application you will have to > implement your own thread-safe object cache as described in Section > 11.2. > > Boris > From troy.heron at hixxy.org Sat Nov 30 00:27:12 2013 From: troy.heron at hixxy.org (Troy Heron) Date: Sat Nov 30 00:27:20 2013 Subject: [odb-users] Problems with foreign key constraints when erasing Message-ID: Hello, I'm investigating using ODB with SQLite for a project, but have hit a bit of a wall as far as managing the erasure of objects. It seems when building more complex relationships, erasure doesn't work so well. Is the only way to deal with erasing these objects is to manually delete each one back to the final reference with no cascade at all? This seems very broken. I've already read this post from 2011: http://www.codesynthesis.com/pipermail/odb-users/2011-August/000267.html Here it is suggested that you could enable cascade on delete using ALTER TABLE. This isn't at all possible with SQLite. Unfortunately the problem of erasing the hierarchy of objects I have planned is too complex for the manual approach and it seems to me that I will be unable to make use of ODB unless there is something I'm missing or something that has changed so I can enable cascade on delete at the schema generation stage. There also appears to be no other alternatives other than manual SQL around (or light wrappers over manual SQL). Thanks, Troy Heron From boris at codesynthesis.com Sat Nov 30 04:51:11 2013 From: boris at codesynthesis.com (Boris Kolpackov) Date: Sat Nov 30 04:53:35 2013 Subject: [odb-users] Problems with foreign key constraints when erasing In-Reply-To: References: Message-ID: Hi Troy, Troy Heron writes: > Is the only way to deal with erasing these objects is to manually > delete each one back to the final reference with no cascade at all? On-delete cascading has been requested quite a few times and it is in our TODO list. If you would be willing to give this feature a try, I can go ahead and implement it (we always prefer to implement features that someone is willing to beta-test). Boris From troy.heron at hixxy.org Sat Nov 30 13:44:03 2013 From: troy.heron at hixxy.org (Troy Heron) Date: Sat Nov 30 13:44:12 2013 Subject: [odb-users] Problems with foreign key constraints when erasing In-Reply-To: References: Message-ID: I'd certainly be interested in beta-testing. Is there much involved in the implementation or is it mostly a matter of turning it on? Troy On Sat, Nov 30, 2013 at 7:51 PM, Boris Kolpackov wrote: > Hi Troy, > > Troy Heron writes: > > > Is the only way to deal with erasing these objects is to manually > > delete each one back to the final reference with no cascade at all? > > On-delete cascading has been requested quite a few times and it is > in our TODO list. If you would be willing to give this feature a try, > I can go ahead and implement it (we always prefer to implement features > that someone is willing to beta-test). > > Boris > From info at peredin.com Sat Nov 30 14:23:35 2013 From: info at peredin.com (Per Edin) Date: Sat Nov 30 14:23:44 2013 Subject: [odb-users] Problems with foreign key constraints when erasing In-Reply-To: References: Message-ID: Hi Boris and Troy, I heavily rely on CASCADE in other projects although I have yet to experience any problems with ODB's lack of supportt. If you implement support I would happily beta-test it! / Per On Sat, Nov 30, 2013 at 10:51 AM, Boris Kolpackov wrote: > Hi Troy, > > Troy Heron writes: > >> Is the only way to deal with erasing these objects is to manually >> delete each one back to the final reference with no cascade at all? > > On-delete cascading has been requested quite a few times and it is > in our TODO list. If you would be willing to give this feature a try, > I can go ahead and implement it (we always prefer to implement features > that someone is willing to beta-test). > > Boris >