> Sorry to vacillate, but I realized here that if I use the new
> operator, then I lose the caching feature from the DaoManager class.
> Is there a better way?
There is a better way Jeff but it seems to be very poorly documented. Sorry about that.
There is a doaClass field on the @DatabaseTable annotation where you specify the class of the dao to use for that table:
http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/table/DatabaseTable.html#daoClass%28%29
There's a _very_ meager mention of it in the manual and nothing in the section on the DaoManager unfortunately.
http://ormlite.com/docs/database-table
gray
> This worked, thanks! I'll try to look up why "dummy" constructors
> have to be implemented instead of the compiler using the superclass's
> constructor by default.
That's part of the Java spec. Constructors are not inherited from the base class unless you define none of them in the superclass.
gray
If you don't want your model class to have the dependency on your
custom Dao implementations, you may better off creating your
TableConfig objects at runtime or use the new config file (see the
DatabaseConfigUtil) so you don't have to define the custom Dao class
within the annotation.
http://ormlite.com/javadoc/ormlite-core/doc-files/ormlite_4.html#SEC41