Comments (2)
I was about to update the issue with that the generated example_model.g.dart did not have the rel convertion methods. Anyway I couldn't make it work this way. So i implemented a custom map for to-from methods. I think it's the best way to it with more control. Thanks!
from objectbox-dart.
From what I can see the constructors of the classes you have given do not have parameters for the relation fields:
Book({
required this.content, // no parameter for author
});
Person({
required this.name, // no parameter for books
});
In any case, I would strongly recommend to use a different model for the database and the JSON serializer and map between them. It would avoid this issue and also make any future changes easier to handle.
Let me know if this resolves your issue!
from objectbox-dart.
Related Issues (20)
- Bad state: ToOne relation field not initialized thrown when accessing target
- Direct change of an related object via the main saved obj. HOT 1
- $ in the property name eror in the objectbox.g.dart file HOT 2
- Error after upgrading: Unsupported operation: ObjectBox platform-specific library not compatible HOT 8
- Mac app was crashed by objectbox HOT 7
- ObjectBoxException on Windows with Flutter: "failed to create store: Incoming entity ID does not match existing UID" HOT 3
- ObjectWithScore class not exported HOT 3
- [objectbox_generator] Upgrade cryptography HOT 7
- Combine query links using OR HOT 1
- Inaccuracy in stored floating point numbers. HOT 7
- objectbox-generator: outdated cryptography dependency HOT 1
- ToMany adds sort memory HOT 2
- Cannot figure out default value for field: Salescategory salesCategory HOT 4
- Admin: on macOS no database found at location HOT 4
- Need help HOT 1
- Issue with Store.attach() throwing UnsupportedError on iOS physical device HOT 3
- EXC_BAD_ACCESS fatal crash on iOS 17 when accessing store from within isolate HOT 10
- Can not load ToMany data content HOT 8
- `IndexError (RangeError (byteOffset) ...` error on iOS HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from objectbox-dart.