objectbox-generator icon indicating copy to clipboard operation
objectbox-generator copied to clipboard

C++ One to many relationship

Open ottolewis8 opened this issue 2 years ago • 2 comments

The C++ docs are sparse, how do you make a one to many relationship? I get error: parentid: unsupported vector element type: ULong Looking at: https://github.com/objectbox/objectbox-generator/blob/main/test/comparison/testdata/fbs/typeful/schema.fbs only string and byte are supported? ` table Slot { /// objectbox:id id : ulong;

defaultlinkoffset : int32;

/// objectbox:relation=Device parentid : [ulong;] // Does not work } table Device { /// objectbox:id id : ulong; hid : string; } `

ottolewis8 avatar Oct 17 '23 16:10 ottolewis8

A 1:N relationship needs an ID (not a vector of IDs) at the "1" side of 1:N.

greenrobot avatar Oct 17 '23 19:10 greenrobot

Thanks that can work are there any plans to support vectors of int32/64 as only byte, ubyte and string are supported for C++?

ottolewis8 avatar Oct 18 '23 12:10 ottolewis8