[odb-users] Objects without primitive fields & NULL data to BLOB
Alexander Prokhorov
prokher at gmail.com
Mon Jan 14 07:24:16 EST 2013
Hi, Boris.
Thanks for your quick fix of polymorphic save/load of large objects in
odb compiler. Now it works perfectly. However, we have encountered some
fresh problems.
Some history - we use ODB with Qt profile and Sqlite, on multiple
platforms. However, in-depth debugging was performed on linux-64 (ubuntu
10, 11, 12).
1. [clear bug] It took some time to pinpoint exact problem, which is
this - objects without any primitive fields can't be loaded. So, when
persistent object contains only collections, load fails with syntax
error - odb generates broken query like "SELECT FROM ...". Look into
attached example odb_collections_test. Simple workaround is to add dummy
primitive field to persistent class.
2. [bug or feature] Another strange thing that was encountered in same
persistent classes - saving NULL data to "blob" type by custom traits.
It's unclear, whether such operation is valid, however, I haven't found
deep traits description that is deep enough to figure it out. It fails
with 'object already persistent' message, which is, at least,
perplexing. Message is clearly bad, the question is, can we save NULL
blob at all? Non-null with zero size is ok. Look into attached example
odb_traits_test.
Thanks in advance.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: odb_test.tar.gz
Type: application/x-gzip
Size: 3897 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20130114/5fba347c/odb_test.tar.bin
More information about the odb-users
mailing list