objectbox / objectbox-c

C and C++ database for objects and structs
https://objectbox.io/
Apache License 2.0
194 stars 35 forks source link

How to make a many-to-many relation in fsb file and objectbox-generator for c++? #20

Closed Mr17MG closed 2 years ago

Mr17MG commented 2 years ago

This is my database.fsb file

table Author {
    /// objectbox:id
    id:ulong;
    text:string;
}

table Book{
    /// objectbox:id
    id: ulong;
    name: string;

    /// objectbox:relation(name=authors,to=Author)
    authors:ulong;
}

What type I must use for authors in Book table to make a many-to-many relation between book and authors?

greenrobot commented 2 years ago

I think you already brought this to stackoverflow back then? It does not fit here.