[odb-users] query a container

sam.degheldere at bricsys.com sam.degheldere at bricsys.com
Thu Apr 16 10:02:32 EDT 2020



I have class that trimmed down looks like this:


#pragma db object

class Commit



    #pragma db transient

    std::map<OdString, std::shared_ptr<FileData>> m_files;



using file_types = std::map<std::string, std::shared_ptr<FileData>>;

#pragma  db member(commit_file)                            \

               id_column("commit_id")                      \

               key_column("path")                          \

               value_column("storage_id")                   \

               virtual(file_types)                         \

                       get(getUtf8Map(this.m_files))       \

                       set(fromUtf8Map(this.m_files, (?)))




I was wondering if I can somehow query on this map?

Specifically I'd like to query all my commits that contain a certain path

Is this possible?


Thanks in advance

Kind regards


More information about the odb-users mailing list