ORMLite / News: Recent posts

released version 4.48

Small bug fix release with a couple of features.

  • CORE: Added support for tracking direct database connection activity with DatabaseConnectionProxy.
  • CORE: Fixed problem when inserting no columns to Sqlite (Android), other DBs. Thanks to Michael Weimann. Bug #155.
  • CORE: Added support for canceling of long running prepared queries. Thanks to Nathan Jones.
  • CORE: More aggressively remove of some ThreadLocal data. Thanks to Pavel Arnošt.
  • CORE: Fixed QueryBuilder.orderByRaw(...) and orderBy(...) mutually exclusivity. Thanks to Diederik. Bug #161.
  • CORE: Fixed problem with queries similar to and().not().like(...). Thanks to ????. Bug #159.
  • CORE: Added better use of object cache when hydrating foreign fields. Thanks to Anthony Whitlock. Feature #38.
  • ANDROID: Added initial API compatibility code for handling multiple API versions.
Posted by Gray Watson 2013-12-16

released version 4.46

Bug fix with some new features:

  • CORE: Added support for raw selects in inner queries. More powerful and flexible.
  • CORE: Added support for @DatabaseField(readOnly = true) for query only fields. Thanks to Casey.
  • CORE: Added support for using java.sql.Timestamp fields with @DatabaseField(version = true).
  • CORE: Added support for QueryBuilder.prepareStatementInfo() to return statement and args. Thanks to SO user.
  • CORE: Fixed problems with SQLExceptions thrown during transaction rollbacks. Thanks to Miroslav Nadhajský. Bug #148.
  • CORE: Fixed a stupid bug in the handling of ColumnArgs and Strings (plus others). Thanks to jon. Bug #147.
  • CORE: Fixed eager-collection clear() which was broken. Thanks to igromanru. Bug #149.
  • CORE: Fixed eager-collection iterator.remove() which removed every other. Thanks to igromanru. Bug #150.
  • CORE: Added support for the javax.persistance @Basic annotation. Thanks to Roland Oldenburg. Bug #151.
  • JDBC: Made some portions of JdbcPooledConnectionSource protected for subclasses. Thanks to Miroslav Nadhajsky.
  • ANDROID: Fixed possible problem with not closing Cursor in queryForFirst(). Thanks to Guillermo Campelo. Bug #143.
Posted by Gray Watson 2013-07-29

released version 4.45

  • CORE: Fixed bad bug introduced in 4.43 that broke date-string backwards compatibility. Thanks to Howard Liberty.
  • ANDROID: Added better exception handling around inner classes. Thanks to Jonathan Caryl.
  • ANDROID: Fixed bad problem with recursion and OrmLiteConfigUtil. Thanks to Jonathan Caryl.

Looks like I didn't add news for 4.44:

  • CORE: Improved the speed of the version checking under Android. Thanks much to Nick Campion.
  • ALL: Moved to github.com and to use git for all packages.
Posted by Gray Watson 2013-03-18

released version 4.43

It's been a long time since the last release so there are a lot of changes here.

  • CORE: Added QueryBuilder.countOf() and queryRaw() methods as shortcuts to their DAO equivalents.
  • CORE: Added Where.queryForFirst(), queryRaw(), queryRawFirst(), countOf() methods as shortcut to QueryBuilder.
  • CORE: Added the ColumnArg feature to compare two columns using QueryBuilder in simple queries and joins.
  • CORE: Fixed a problem with GROUP BY, ORDER BY, and HAVING order. Bug #134.
  • CORE: Fixed possible problem with field-type comparison in certain situations. Thanks to shikajiro. Bug #136.
  • CORE: Added ? arguments to QueryBuilder.orderByRaw(...) method. Thanks a bunch to Nathan Jones. Feature #138.
  • CORE: Added support for multiple JOIN statements. Thanks to Ramps. Feature #28.
  • CORE: Added ability to select log-type using "com.j256.ormlite.logger.type" system property. See LoggerFactory.
  • CORE: Creating an empty foreign collection now mirrors the collection type. "Fixes" bug #124.
  • CORE: Made the RuntimeExceptionDao implement ClosableIterarble. Feature #34.
  • CORE: Added Dao.assignEmptyForeignCollection() method to replace the getEmptyForeignCollection(). Feature #31.
  • JDBC: Improved the log class detection and added support for Slf4j nad Log4j2. Feature #27.
  • ANDROID: Added protections around missing classes when building class config. Thanks to Bart. Bug #133.
  • ANDROID: Fixed unclosed Cursor in AndroidDatabaseConnection.isTableExists(). Thanks to Andreas. Bug #137.
  • ANDROID: Added handling of inner classes that have annotations. Thanks to Ваcилий Казьмин. Feature #35.
Posted by Gray Watson 2013-02-06

released version 4.42

It's been a while since a release so this covers a lot of ground. Added some JOIN query capabilities. Fixed some bugs. Improved the Oracle support.

  • CORE: Added basic INNER and LEFT JOIN capabilities for queries only. Finally. Work in progress.
  • CORE: Added ObjectFactory support on the DAO to better support Guice and other wiring. Thanks to glenviewjeff.
  • CORE: Fixed a bug in comparing superclasses of the field with the field. Thanks to glenviewjeff. Bug #3538777.
  • CORE: Fixed problems with java.sql.Date and Timestmp persisters. Thanks to Mohammad Moghimi. Bug #3534395.
  • CORE: Added queryRawValue() method to the DAO for getting a single aggregate result.
  • CORE: Added last(), moveAbsolute(), and close() methods to DatabaseResults. Thanks to Andrey.
  • CORE: Added a Dao.getConnectionSource() method to assign with the RuntimeExceptionDao. Thanks to glenviewjeff.
  • CORE: Added closeQuietly() methods for all close() methods in a number of classes/interfaces.
  • CORE: Added Dao.executeRawNoArgs() method for executing raw statements with no arguments. Necessary for JDBC fix.
  • CORE: Added the ability to order your foreign collections ASC or DESC. Thanks to Jaykob. Feature #3571690.
  • ANDROID: Added support for auto-commit under Android using transactions. Thanks to Chad Schultz.
  • ANDROID: Added getCount() and getPosition() cursor methods AndroidDatabaseResults. Thanks to Andrey.
  • JDBC: Fixed some problems with the OracleDatabaseType. Work in progress. Thanks much to Stew.
  • JDBC: Added OTHER to the SqlType enum for custom persisters. Thanks to Mark Rogers.
  • JDBC: Added a DatabaseConnection.executeStatement() method which uses Statement.execute() for SQL. Thanks to Stew.
  • JDBC: Fixed a problem with Oracle where we were asking for column info too early. Thanks to Stew. Bug #3570129.
Posted by Gray Watson 2012-09-27

released version 4.41

Some features and bug fixes. Nothing really exciting.

  • CORE: Added java.sql.Date and java.sql.Timestmp data persister types. java.util.Date is still recommended.
  • CORE: Added version checking which logs errors if core, jdbc, and android versions do not match.
  • CORE: Added a Dao.getRawRowMapper() for mapping result string to an object.
  • CORE: Added some handling of ForeignCollection with the javax.persistence.* annotations.
  • CORE: Fixed problem with maxForeignAutoRefreshLevel that made it ~worthless. Thanks to Andrea Sprega. Bug #3530801.
  • ANDROID: Fixed the updating of serializable and other byte[] fields. Thanks to Yossi Wasserman. Bug #3527685.
Posted by Gray Watson 2012-06-06

released version 4.40

Bug fix release that impacts Android users significantly.

  • CORE: Fixed a couple of missing field configuration entries. Thanks to Jeremy Stone. Bug #3518474.
  • CORE: Fixed a problem that was causing FieldType to always use reflection. Thanks to Jeremy Stone. Bug #3518472.
Posted by Gray Watson 2012-04-17

released version 4.39

Couple features and some bug fixes. Fixed a bad Android bug around self-referencing tables.

  • CORE: Deprecated @DatabaseField foreignColumnName, renamed to foreignFieldName. Thanks to Candlejack. Bug #3507094.
  • CORE: Changed dao.callBatchTasks() from throwing Exception to SQLException. Thanks to JC.
  • CORE: Improved createOrUpdate() to use idExists() instead of expensive method. Thanks to Chris Nevill. Bug #3514164.
  • CORE: Fixed tough bug with table configs of self referencing classes. Thanks to Slava Tysianchuk. Bug #3517094.
  • CORE: Added support for start and endThreadConnection() and added dao.commit() and rollBack(). Thanks to AlexPal.
  • JDBC: Added support for preparedStatement.setQueryTimeout(millis). Thanks to mjomble. Feature #3502803.
  • JDBC: Fixed bug with pooled connection source and connections with autoCommit off. Thanks to AlexPal. Bug #3517098.
  • ANDROID: Finally fixed the number of rows changed for insert/delete/update calls using SQLite CHANGES() pragma.
  • ANDROID: Decided to not fix the columnName case sensitivity issue introduced in 4.37. Thanks to Roman Zimmer.
  • ANDROID: Fixed bad bug that was prematurely clearing DAO configs. Thanks to Slava Tysianchuk. Bug #3516920.
Posted by Gray Watson 2012-04-13

released version 4.38

Emergency bug fix for Android to address problems with object cache and foreign collection interactions during application restart.

  • ANDROID: Fixed bad ObjectCache bug deep in Android shutdown/startup logic. Thanks to Filipe Leandro. Bug #3510266.
Posted by Gray Watson 2012-03-23

released version 4.37

Emergency bug fix release to address problems with object cache exceptions.

  • CORE: Fixed blocking bug where object cache exceptions would be thrown. Thanks to Filipe Leandro. Bug #3509853.
  • CORE: Fixed bug where LocalLog was overwriting log data written to local file. Thanks to mjomble. Bug #3437823.
  • ANDROID: Fixed a bug with Android API lookup of column names with periods. Thanks to Sebastian Roth. Bug #3509386.
Posted by Gray Watson 2012-03-21

released version 4.36

Couple features and bug fixes.

  • CORE: Added support for @DatabaseField(foreignColumnName="name") to map foreign to non-ID. Thanks to Mathias Lin.
  • CORE: Added update() and refresh() to ForeignCollection which call through to the inner Dao.
  • CORE: Improved the custom data persister code so it can extend one of the types. Added docs and example.
  • CORE: Added a Joda DateTime persister which uses reflection.
  • CORE: Increased synchronization around some code to be proactive about constructor reordering race-conditions.
  • CORE: Added updateAll(), refreshAll(), refreshCollection() for eager foreign collections. Thanks to Chris Nevill.
  • CORE: Added logging of exceptions to the RuntimeExceptionDao. Thanks to Kaan.
  • CORE: Revamped the Logger stuff to remove new Object[] that was happening on each Logger call. Bug #3509015.
  • JDBC: Fixed a bug in where transactions aren't commited with auto-commit off. Thanks to Tony. Bug #3508746.
Posted by Gray Watson 2012-03-20

released version 4.35

Sorry for this. Fixed a bug which should improve cache operations significantly.

  • CORE: Fixed bug where not all queried objects were added to cache. Thanks to Filipe Leandro. Fixes bug #3491418.
Posted by Gray Watson 2012-02-23

released version 4.34

Medium sized feature and bug-fix release.

  • CORE: Fixed restriction on Long auto-incremented SQLite ids. Thanks to John Kristian. Fixes bug #3474479.
  • CORE: Added support for sql NOT IN clause to where(). Thanks to Marvin Jomble. Fixes feature #3474550.
  • CORE: Added support for sql HAVING clause to QueryBuilder. Thanks to Stephen Couchman. Fixes feature #3470923.
  • CORE: Added updateBuilder.update() and deleteBuilder.delete(). Thanks to Marvin Jomble. Fixes feature #3475613.
  • CORE: Fixed problem with ForeignCollections when inserting into cache. Thanks to Nick Campion. Fixes bug #3486577.
  • CORE: Revamped the CloseableIterator to support first, previous, ... moving methods to support more than next.
  • CORE: Added result-flags to some of the iterator methods to allow forwards/backwards in JDBC.
  • CORE: Refactored the FieldConverter and BaseDataType stuff a bit to remove some duplicate code.
  • CORE: Added convenience QueryBuilder.queryForFirst() and queryRawFirst() methods.
  • CORE: Added setArgumentHolderValue() to the PreparedStmt so we can set an argument on prepared queries directly.
  • CORE: Removed the deprecated @DatabaseFieldSimple and friends that were removed in 4.30.
  • ANDROID: Significantly simplified, improved the internal DAO caching. Thanks to Ben Mosher. Fixes bug #3487674.
  • ANDROID: Fixed missing exception handling in AndroidConnectionSource. Thanks to Roger Keays. Fixes bug #3474501.
  • ANDROID: Added isTableExists() support to Dao/AndroidDatabaseConnection. Thanks to Patrick. Fixes feature #3475173.
Posted by Gray Watson 2012-02-22

released version 4.33

Quick bug fix release.

  • Fixed a find-bugs result from the eager collection equals method that would always return false.
  • Fixed [another] problem with foreign collections and multiple foreign fields. Thanks to André. Fixes bug 3473078.
  • Fixed a problem with SqlServer or JTDS driver returning -1 for some statements. Fixes bug 3463333.
Posted by Gray Watson 2012-01-13

released version 4.32

Medium sized bug fix release.

  • CORE: Fixed bad bug where foreign objects cannot have primitive ids. Thanks to Vladimir. Fixes bug #3456339.
  • CORE: Fixed bug where foreign collections couldn't handle two foreign fields. Thanks to André. Fixes bug #3471320.
  • CORE: Added support for a BIG_DECIMAL_NUMERIC to support existing NUMERIC database fields.
  • JDBC: Fixed bug where SQLite class warning is spit out for other databases. Thanks to Kaan. Fixes bug #3472476.
  • JDBC: Fixed problem with MySQL's creating of index if not exists. Fixes bug #3472782.
Posted by Gray Watson 2012-01-12

released version 4.31

Bug fix release but a bad bug around UpdateBuilder and null values.

  • CORE: Added missing IF NOT EXISTS handling to index creation. Thanks to mjomble. Fixed bug #3437795.
  • CORE: Fixed problem with hasNext() always moving cursor forward. Thanks to Tom Tantisalidchai. Fixes bug #3449877.
  • CORE: Fixed bad bug which stopped field being updated with null. Thanks to Javier Hinmel. Fixed bug #3454723.
  • ANDROID: Added better SQL logging to Android connections.
  • JDBC: Added better SQL logging to JDBC connections.
Posted by Gray Watson 2011-12-08

released version 4.30

Couple improvements and bug fixes here. A big improvement with annotation speed under Android although config file is still tons better.

  • CORE: Added ability to specify ForeignCollection columns in selectColumns(). Thanks to @Timo. Fixes bug #3428751.
  • CORE: Added two new Dao methods: mapSelectStarRow and getSelectStarRowMapper for easier mapping of results.
  • CORE: Deprecated the @DatabaseFieldSimple and other smaller annotations that were causing confusion. Sorry.
  • CORE: Fixed config loader support for foreignAutoCreate and version fields. Thanks to Chase. Fixes bug #3433599.
  • CORE: Fixed foreignAutoCreate bug where parent object didn't get foreign id. Thanks to Chase. Fixes bug #3434550.
  • CORE: Added hasColumnName() method to TableInfo. Thanks to JC. Resolves feature #3435754.
  • CORE: Added Dao.idExists(ID id) to see if row with id exists. Thanks to Craig Andrews. Resolves feature #3300688.
  • CORE: Moved limit() and offset() to take long parameters to be more consistent. Possible deprecation warings.
  • ANDROID: Added some reflection fu to make reading Annotations ~20 times faster. Thanks a ton to Josh Guilfoyle.
  • ANDROID: Fixed problems with countOf() dao method. Thanks to Pedro Velasco. Fixes bug #3434508.
  • JDBC: Added support for better escaping of "schema"."table" in Postgres. Thanks to Johny Jugianto.
Posted by Gray Watson 2011-11-11

released version 4.29

Fixed a casting error in 4.28 for android.

  • ANDROID: Fixed a casting bug in OrmLiteSqliteOpenHelper from 4.28. Thanks to Craig Andrews. Fixes bug #3428429.
Posted by Gray Watson 2011-10-25

released version 4.28

Couple new features and some bug fixes.

  • CORE: Added Dao.countOf(PreparedQuery) and QueryBuilder.setCountOf(true). Thanks to Pedro Velasco.
  • CORE: Added QueryBuilder.rawColumns(String... columns) to better support aggregates. Thanks to Pedro Velasco.
  • CORE: Added support for @DatabaseField(version=true) and row version field for numbers and Date's. Cool.
  • CORE: Fixed a field that was missing transient, making LazyForeignCollection not serializable. Fixes bug #3426884.
  • ANDROID: Added OrmLiteSqliteOpenHelper.getRuntimeExceptionDao(). Thanks to João Bosco. Resolves feature #3425272.
  • JDBC: Fixed a spin loop in the JdbcPooledConnectionSource. Thanks to Ali Aksakarya. Fixes bug #3426903.
Posted by Gray Watson 2011-10-24

released version 4.27

Smaller release with foreignAutoCreate=true, BigDecimal, and BigInteger support.

  • CORE: Added @DatabaseField(foreignAutoCreate=true) for auto-creating foreign fields with blank IDs using the internal DAO.
  • CORE: Added support for storing BigDecimal and BigInteger fields. Thanks to Pedro Velasco. Resolves feature #3414432.
  • CORE: Added support for the javax.persistence.Enumerated annotation for setting @Enumerated(ORDINAL) or @Enumerated(STRING).
  • CORE: Fixed problem with the columnDefinition field handling in @DatabaseFieldOther. Thanks to Flo. Fixes bug #3419779.
  • CORE: Removed the restriction on classes with just the ID. Update now just returns 0.
  • ANDROID: Better handling of errors during java auto-detection around the new table configuration code. Thanks to Ming Lin.
Posted by Gray Watson 2011-10-11

released version 4.26

Biggest changes in this release are the initial support for an object cache and the improvements around Android type configuration for startup optimization.

  • 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.
Posted by Gray Watson 2011-09-26

released version 4.25

Small release to fix some problems and add support for the allowGeneratedIdInsert feature:

  • Fixed problem with id=true with UUID fields not working. Thanks to Evan Grim. Fixed bug 3392691.
  • Exposed the fields in CreateOrUpdateStatus that were package protected (fail!). Thanks to steffen. Fixes bug #3383768.
  • Added to FieldType getter for foreign field type. Resolves feature request #3386969. Thanks to Jean-Maxime Pelletier.
  • Fixed problem with null ids an createOrUpdate. Thanks to João Bosco. Fixes bug #3390169.
  • Fixed multi-threaded race condition with field and constructor accessibility. Thanks to Jeroen Rakhorst. Fixes bug #3381083.
  • Added allowGeneratedIdInsert feature to allow optional generated-id fields. Thanks to Craig Andrews.
Posted by Gray Watson 2011-08-22

released version 4.24

A bug fix release with some additional features.

  • CORE: Fixed problem with updating a field's value to be null using UpdateBuilder. Thanks to Jeremy Mcjunkin. Fixes bug #3359086.
  • CORE: Fixed foreign collection bugs where clear, remove, ... affected the whole table. Thanks to Patras Vlad. Fixes bug #3313003.
  • CORE: Fixed bug with the setting of the value of serializable types. Thanks to kyle lampert. Fixes #3363423.
  • CORE: Added feature where foreign collections now contain objects whose foreign fields are set with the parent object.
  • CORE: Added Dao.queryForMatchingArgs() and queryForFieldValuesArgs() to avoid SQL escaping issues. Thanks to coder sam.
  • CORE: Added support for CREATE TABLE IF NOT EXISTS for Postgres > 9.1 Thanks to Daniel Colchete.
  • CORE: Added arguments to Where.raw() and added Where.rawComparison() to better handle escaped args. Thanks to Daniel Colchete.
  • CORE: Removed deprecated raw results methods that were replaced in 4.10.
  • CORE: Removed deprecated JAVA_DATE* types that were replaced in 4.12.
  • ANDROID: Added a OrmLiteBaseActivityGroup to the various base classes. Thanks to zachawilson.
Posted by Gray Watson 2011-07-18

released version 4.23

Small feature release to get some features off the TODO list.

  • CORE: Allow the user to be able to override the persister for the built-in types as well.
  • CORE: Added a orderColumnName field to the ForeignCollectionField to order collections based on a column.
  • CORE: Moved the external log classes over to the JDBC package to make core a bit smaller.
  • CORE: Added queryForSameId(), createIfNotExists(), and createOrUpdate() to DAO.... read more
Posted by Gray Watson 2011-06-03

released version 4.22

A number of big bugs around foreign fields and ForeignCollection's are in this release.

  • CORE: Fixed major problem with DAO loops and caching. Thanks much to the user list. Fixes bug #3301588.
  • CORE: Fixed problem with queryForMatching() and queryForFieldValues() if no fields. Thanks to JC. Fixes bug #3301253.
  • CORE: Fixed problem with configuring fields in base class without annotations. Thanks to JC and Rahan. Fixed bug #3301698.
  • CORE: Fixed problem with LazyForeignCollection.toArray(T[]). Thanks to Skylar. Fixes bug #3302924.
  • CORE: Added initial support for defining external DataPersister classes for persisting non-built-in types. Thanks to Craig.
  • CORE: Removed auto-downcasing of hand wired table name in DatabaseTableConfig. Thanks to Tomas. Fixes bug #3302976.
  • CORE: Added the maxEagerForeignCollectionLevel field to the @ForeignCollectionField annotation to limit recursion.
  • CORE: Renamed the maxForeignLevel field in @DatabaseField to be maxForeignAutoRefreshLevel to make more sense.
  • CORE: Added support for creating an empty foreign collection field so you can use add() on it when creating. Thanks to Craig.
  • CORE: Added the concept of closeLastIterator() to the DAO and CloseableWrappedIterable for reentrant usage.
  • CORE: Added better connection/statement testing code and fixed some additional missing closes.
  • JDBC: Tweaked the HSQLdb database type to acknowledge that it seems to support inner transactions.
Posted by Gray Watson 2011-05-19