[odb-users] Querying entity's container

Adnan RIHAN axel50397 at gmail.com
Fri Mar 13 05:46:31 EDT 2015


I need to find an entity based of one of it’s container’s data.

Let me explain, I’m on a CashRegister app.

I have the Product entity, which contains a Containers of String (QSet<QString>, unique in the table) to store the barcodes.
I have an Offer entity, which stores a Product and a Price.

I need to be able to find an Offer, using a barcode. So basically, except if it’s easily possible, I think I need to find a Product based on a barcode but I don’t see how to build the “odb::query<Product>” to find the Product which contains “barcode” in its container.

Is there a way, or do I need a workaround? Or suggestions?
Thanks
--  
Cordialement, Adnan RIHAN.
Directeur-Gérant de Eolis-Software, société de services informatiques.  

GPG: 5675-62BA (https://keybase.io/max13/key.asc)
-> Si vous n'utilisez pas GPG mais souhaitez quand même m’envoyer un e-mail chiffré: (https://encrypt.to/0x567562BA).



More information about the odb-users mailing list