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

Is there an example on how to define and use the object model at runtime?

Open florianwinterstein opened this issue 4 years ago • 1 comments

I like to build an android app using the ObjectBox. In this case the entities and attributes are not known at compile time.

Is it possible to create the data model at run time (e.g. generating the objectbox-models/default.json during runtime) and use the ObjectBox classes without any compile time annotations? I could not find any references for this mode of operation.

Thanks!

florianwinterstein avatar Aug 13 '20 21:08 florianwinterstein

ObjectBox persistence is modeled around objects and thus classes. Tools run at build time to generate code optimized to classes. This is an important aspect of ObjectBox being as fast as it is.

While we promote this high performance concept to developers, we also look into offering flexibility. Maybe you can share a bit on your use case and how you intend to process data of unknown structure.

greenrobot avatar Aug 14 '20 07:08 greenrobot