* CORE: Added the first take on a object cache. Thanks to the dev list for suggestions.
* CORE: Improved the javax.persistence annotation handling to support @JoinColumn(name="xxx"). Thanks to Andrew Sleeman.
* CORE: Added a RuntimeExceptionDao for wrapping Dao operations in RuntimeExceptions. Thanks to the Android list.
* CORE: Added a Dao.deleteById() method for removing an instance if you just have the id.
* CORE: Added @DatabaseField(columnDefiniton = "...") for hand-defining the field SQL.
* CORE: Removed the deprecated RawResults class that was replaced in 4.10.
* CORE: Fixed problem with self-generated id fields not being marked as primary. Thanks to Craig Andrews. Fixes bug #3406600.
* CORE: Fixed a problem where default was canBeNull=false with javax persistence macros. Thanks to A. Fixes bug #3410640.
* CORE: Removed the maxForeignLevel() field from @DatabaseField which was deprecated in 4.22.
* CORE: Added table and field configuration file reading and writing.
* ANDROID: Added field configuration utility for avoiding Dao creation performance problems with annotations. Thanks to Ian Dees.
* ANDROID: Added @DatabaseFieldSimple and other smaller annotations for speeding up Android configuration.
* ANDROID: Added SQLiteDatabase constructor to AndroidConnectionSource for external SQLite databases. Thanks to Michael.
* ANDROID: Removed the SqliteOpenHelperFactory class that was deprecated in 4.20.
* ANDROID: Fixed issue that was not properly supporting CREATE IF NOT EXISTS. Thanks to birbird. Fixes bug #3412135.
* ANDROID: Added RuntimeExceptionDao for shielding applications from _some_ of the SQLException handling.
You can get the release via ORMLite:
or via Maven once the sync finishes:
http://repo1.maven.org/maven2/com/j256/ormlite/
Or from sourceforge.net. Feedback always welcome.
gray
> Regarding " Added field configuration utility for avoiding Dao creation performance problems with annotations."
> are there anything Developer need to do special in order to setup Android Eclipse project?
Excellent question that I should have addressed in my followup mail to 4.26. There is some documentation on how to get it to work. It's not as easy as it should be.
http://ormlite.com/docs/table-config
The big caveat is that it is right now a _manual_ process. There have been some discussions around maven and ant integration.
Feedback on the documentation is welcome.
gray
Here's how I'm doing it:
1.) In .gitignore (or however you ignore a file in the VCS you're using),
ignore res/raw/ormlite_config.txt.
2.) In ant's build.xml, add these targets:
<target name="-pre-build">
<!--res/raw probably doesn't exist yet, so make it-->
<mkdir dir="res/raw" />
<!--file is ignored in source control, but required during build. So
create a blank file, then in a later phase,
before the apk is made, the real file will be created-->
<touch file="res/raw/ormlite_config.txt" />
</target>
<target name="-post-compile" depends="ormlite">
</target>
<target name="ormlite">
<java fork="false" failonerror="yes"
classname="com.j256.ormlite.android.apptools.OrmLiteConfigUtil">
<classpath>
<fileset dir="${jar.libs.dir}">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${out.classes.dir}"/>
<path refid="android.target.classpath"/>
</classpath>
<arg value="ormlite_config.txt"/>
</java>
</target>
That should do it. The ormlite_config.txt is not included in source
control (having in source control is incredibly annoying, as it changes
for literally every build due to a timestamp at the top of it) and
automatically without thought regenerated for each compile.
~Craig
Here's a new version of the OrmLiteConfigUtil.java that I just checked into trunk. This seems to work better although it still feels like a kludge.
This was a problem with the class auto-discovery. Remember is that you can also configure a certain array of classes:
public class DatabaseConfigUtil extends OrmLiteConfigUtil {
private static final Class<?>[] classes = new Class[] {
SimpleData.class,
};
public static void main(String[] args) throws Exception {
writeConfigFile("ormlite_config.txt", classes);
}
}
See the docs: http://ormlite.com/docs/table-config
gray