What is the difference between DAO and RuntimeExceptionDao using Ormlite-Android? When to use one and not other?
The documentation is very clear on the difference. A
Dao (see docs) refers to
Database Access Objects that handle the reading and writing a class from the database
RuntimeExceptionDao (see docs)
Proxy to a
Daothat wraps each
Exceptionand rethrows it as
RuntimeException. You can use this if your usage pattern is to ignore all exceptions. That's not a pattern that I like so it's not the default.
They do the same thing, apart from the
RuntimeExceptionDao will only ever throw a
RuntimeException - For more info on ORMLite, please refer to the ORMLite docs as they are actually really helpful.