I want to override createOrUpdate function in ORMLite, that it is depen on two value: group_id and type. What I want to obtain:
scenario:
In database I have object Model1 and the group_id=1 and type=small
- Want to add Model2 with
group_id=1 andtype=small - update record - Want to add Model23 with
group_id=1 andtype=big - create new record
When I made additional field id and set it to generatedID, I allways adding to database but setting group_id to id is not a good idea.
I suppose I need to override OrmLiteSqliteOpenHelperclass but I dont know where and how to do it
Maybe you can use ohibernate instead of ORMlite
https://github.com/10uroi/OHibernate