Your feedback is highly appreciated! Let's make Vertabelo Mobile ORM even better.

0
Answered
Alex Waugh 5 months ago • updated by Michał Kołodziejski (CTO) 5 months ago 1

Is there a way to perform a case-insensitive 'order by' operation when sorting by a text field?

It seems the default is that uppercase records appear above lowercase.
If not, it might be a nice idea.

Thanks.

0
Answered
Alex Waugh 5 months ago • updated by Michał Kołodziejski (CTO) 5 months ago 1
I am using Vertabelo Mobile ORM with Android.
I have two tables that share a one to many relationship. i.e. Table2 has an FK that references the PK from Table1, which is an auto-incrementing id value.
The normal record creation process would be:
  1. Create instance of Table1
  2. DAO.insert(Table1)
  3. Create instance of Table2
  4. Create the relationship by setting the FK value in Table2 to Table1.getid()
  5. DAO.insert(Table2)

However, I only want a local representation of the records in java, which I may or may not decide to save to the database later, depending on user input. However, I can't do this because I can't create the relationship between them, as the auto-incremented id is only created when the record is saved to the db (step 2).
That means that I can't use Table1.getTable2List(), because the relationship between them does not exist.

Is it even possible to use methods that rely on a relationship between tables, such as get...List(), on local java objects, before they are saved to the db?
If so, is there a way to do this when the FK is an auto-incrementing?

Otherwise, I like the ORM so far! I am new to both Android and Vertabelo and it seems to be saving me some time already so thanks :)