0
votes

Is the ORM in Codename One similar to hibernate? I can't find any detailed examples. I have seen one tutorial to persist objects. But i'm more interested in populating the database with XML during install and then retrieve data on query.

Or, would it be possible to use hibernate with Codename one?

1

1 Answers

3
votes

Codename One doesn't have an ORM. It has an Externalizable implementation similar to Java serialization and manual SQL support but no ORM and nothing like Hibernate.

The reason why that is missing is pretty simple, ORM's require either reflection or bytecode manipulation. Codename One translates code to C for iOS thus discarding reflection meta-data, on Android the code is obfuscated to comply with Googles guidelines (again breaking ORM). So a traditional ORM would be problematic to integrate.