Can I use ormlite to dynamically generate the DAO layer on Android?
-
14-11-2019 - |
Question
I'm trying to solve this problem. I was wondering if it's possible to use ORMLite (or modify it) to support this use case ?
Thanks.
Solution
Just use db4o and forget all the sql and mappings hassle. Model your objects and persist them directly.
OTHER TIPS
Now, you could create a table of screens which could then have a field table with the name of the screen-id, field name, and other information. You could have a user-id in the screen table so each user could have an entry which corresponds to a list of fields.
public class Screen {
String user;
...
}
public class Field {
Screen screen;
String fieldName;
int fieldPosition;
...
}
But unless you actually need SQL functionality, you may want to consider a different persistence strategy like @mgv mentioned.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow