Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ One to many relationship #49

Open
ottolewis8 opened this issue Oct 17, 2023 · 2 comments
Open

C++ One to many relationship #49

ottolewis8 opened this issue Oct 17, 2023 · 2 comments

Comments

@ottolewis8
Copy link

ottolewis8 commented Oct 17, 2023

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;
}
`

@greenrobot
Copy link
Member

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

@ottolewis8
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants