From roberto.minarelli.de at gmail.com Wed Mar 19 12:19:20 2025 From: roberto.minarelli.de at gmail.com (roberto minarelli) Date: Mon Apr 14 08:46:39 2025 Subject: [odb-users] Object already persistent but it's not true Message-ID: Hi all, I got a serious and strange problem using odb.2.5..0-b.25 after passing from Oracle 11g to Oracle 19c Now most of the time I receive the message that an object is already persistent when is not In the same transaction I checked first for the presence of the object and then, as there is no one, I proceed with persisting the object into the database After ODB raise the exception I repeat the query and still there is no object I run out of ideas to solve this problem can you help me please? Thanks a lot Roberto Minarelli Della Valle From lqk1163133210 at gmail.com Sun Mar 30 04:25:00 2025 From: lqk1163133210 at gmail.com (k l) Date: Wed Apr 16 05:51:39 2025 Subject: [odb-users] Compilation Error with ODB Qt Profile: C++11 Requirement and Missing QDateTime Header Message-ID: Dear ODB Development Team, I hope this email finds you well. I am encountering an issue while using the ODB compiler with a class that includes Qt objects (specifically QDateTime). Despite specifying C++11 support, the compilation fails with errors related to Qt?s C++11 requirement and a missing header. Below are the details: ________________________________ Issue Description When attempting to generate code for a PostgreSQL database using the ODB compiler with the Qt profile, the process fails with two critical errors: 1. Error 1: ?? D:/.../qbasicatomic.h:61:4: error: #error "Qt requires C++11 support" Note: The --std c++11 flag is explicitly included in the command. 2. Error 2: test.h:5:21: fatal error: QDateTime: No such file or directory ________________________________ Steps to Reproduce 1. Compilation Command: odb -d pgsql --std c++11 --profile qt -I QT_ROOT/include --generate-schema --schema-format embedded --generate-query --generate-session test.h 2. Relevant Code (test.h): #pragma db object schema("schema") table("table") class test { public: #pragma db id auto column("id") long id_; #pragma db column("create_time") QDateTime create_time_; }; ________________________________ Environment & Context * ODB Version: 2.4.0 * Qt Version: 5.15.2 (MinGW 8.1.0) * OS: Windows * Database: PostgreSQL * Compiler: MinGW/g++ ________________________________ Questions & Support Request 1. C++11 Compatibility: * Why does Qt still report a missing C++11 support even with --std c++11? Is there an additional configuration required for the Qt profile? 2. Header Inclusion: * The QDateTime header is not found despite providing -I QT_ROOT/include. Could this be related to path formatting (e.g., forward vs. backward slashes)? 3. Known Limitations: * Are there known issues with mapping QDateTime in ODB?s Qt profile? ________________________________ Attachments/Additional Info 1. Full error log (attached or included below). 2. File test.h (attached). ________________________________ Thank you for your time and assistance! I would greatly appreciate any guidance to resolve this issue. Best regards, lain -------------- next part -------------- #ifndef TEST_H #define TEST_H #include #include #pragma db object schema("schema") table("table") class test { public: #pragma db id auto column("id") long id_; #pragma db column("create_time") QDateTime create_time_; }; #endif // TEST_H -------------- next part -------------- odb -d pgsql --std c++11 --profile qt -I D:/dev_sdk/qt/5.15.2/5.15.2/mingw81_64/include --generate-schema --schema-format embedded --generate-query --generate-session test.h In file included from D:/dev_sdk/qt/5.15.2/5.15.2/mingw81_64/include/QtCore/qatomic.h:46:0, from D:/dev_sdk/qt/5.15.2/5.15.2/mingw81_64/include/QtCore/qglobal.h:1306, from D:/dev_sdk/qt/5.15.2/5.15.2/mingw81_64/include/QtCore/qchar.h:43, from D:/dev_sdk/qt/5.15.2/5.15.2/mingw81_64/include/QtCore/qstring.h:49, from D:/dev_sdk/qt/5.15.2/5.15.2/mingw81_64/include/QtCore/QString:1, from d:\work_space\cpp\_third\odb-2.4.0-i686-windows\mingw\include\odb\qt\basic\pgsql\default-mapping.hxx:8, from :1: D:/dev_sdk/qt/5.15.2/5.15.2/mingw81_64/include/QtCore/qbasicatomic.h:61:4: error: #error "Qt requires C++11 support" # error "Qt requires C++11 support" ^ test.h:5:21: fatal error: QDateTime: No such file or directory #include ^ compilation terminated.