All methods inside "
qx::dao" namespace are limited to 2 tables when you use relationships.
So with this design (I think it is your database design) :
- Code: Select all
"Article" class [one-to-many] <----> [many-to-one] "ReceiptArticle" class [many-to-one] <----> [one-to-many] "Receipt" class
=> If you execute "
fetch_all_with_all_relations" using "
ReceiptArticle" class => you will fetch all properties of "
Article" class and "
Receipt" class (but not relations).
If you add something like this in your design (see "
Class1" and "
Class2", I think you have your "
Customer" class here) :
- Code: Select all
"Class1" [one-to-many] <----> "Article" class [one-to-many] <----> [many-to-one] "ReceiptArticle" class [many-to-one] <----> [one-to-many] "Receipt" class <----> [one-to-many] "Class2"
"
Class1" and "
Class2" classes will be not fetched because
there is more than 2 tables starting from "ReceiptArticle" class.
This is a limitation of QxOrm library today.
You can workaround this issue defining a view into your database.
Or you can write your own SQL query using QtSql module of Qt library.