The revision history of Android-Orma.
The versioning follows Semantic Versioning:
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
Note that experimental features, annotated with @Experimental
may change without notice.
https://github.com/maskarade/Android-Orma/compare/v6.0.1...v6.0.2
- #436: ManualStepMigration not working at the first time of defining steps (the issue reported and the path reviewd by @k-kagurasaka)
- [test] migration to Robolectric 4.0
https://github.com/maskarade/Android-Orma/compare/v6.0.0...v6.0.1
- No code changes
- Resolve release operation mistake
https://github.com/maskarade/Android-Orma/compare/v5.1.2...v6.0.0
Orma v6 supports AndroidX instead of Android Support Library. If your project depends on Android Support Library, you should keep to use Orma v5.x.
https://github.com/maskarade/Android-Orma/compare/v5.1.1...v5.1.2
- No code changes
- Build as Java 8
- #461: re-write release engineering tasks (thanks to @chibatching)
https://github.com/maskarade/Android-Orma/compare/v5.1.0...v5.1.1
- No code changes
- Upgraded dependencies
- Built with the latest toolchain
https://github.com/maskarade/Android-Orma/compare/v5.0.2...v5.1.0
- Depends on Android Support Library v27.1.1 (from v27.0.2)
- #416:
Relation#convertToContentValues()
- No code change from v5.0.0
- Fix pom metadata for bintray.com
- No code change from v5.0.0
- Changed the
groupId
fromcom.github.gfx.android.orma
tocom.github.maskarade.android.orma
. No package name is changed, though.
https://github.com/maskarade/Android-Orma/compare/v4.2.5...v5.0.0
- Encryption via SQLCipher
- Opt-out RxJava from generated code
There are lots of bug fixes. See the diff.
https://github.com/gfx/Android-Orma/compare/v5.0.0-rc5...v5.0.0-rc6
- just confirming release engineering
https://github.com/gfx/Android-Orma/compare/v5.0.0-rc4...v5.0.0-rc5
- RxJava is now optional (by @k-kagurazaka)
https://github.com/gfx/Android-Orma/compare/v5.0.0-rc2...v5.0.0-rc3
https://github.com/gfx/Android-Orma/compare/v5.0.0-rc2...v5.0.0-rc3
- #405:
Selector#value()
andSelector#getOrNull()
now respectoffset
(@k-kagurazaka) - #407: Add condition helpers for
GLOB
andLIKE
and their negative variants (@k-kagurazaka) - #408: Add
Selector#where(Function<Selector, Selector>)
to build grouped conditions (@k-kagurazaka) - #411: Add
OrmaConnection#close()
to close the connection; keep in mind that it is not needed for typical use-cases (@k-kagurazaka) - #413: Fix crashes with SQLCipher's
DatabaseObjectNotClosedException
inOrmaDatabase#prepareInsertInto*()
https://github.com/gfx/Android-Orma/compare/v5.0.0-rc1...v5.0.0-rc2
- Merge v4.2.5 into master
https://github.com/gfx/Android-Orma/compare/v4.2.4...v5.0.0-rc1
- #402 by @k-kagurazaka: Encryption support with SQLCipher, introducing new modules,
orma-encryption
andorma-core
https://github.com/gfx/Android-Orma/compare/v4.2.4...v4.2.5
- Downgrade ANTLR4 from 4.7 to 4.6; ANTLR4 4.7 crashes Android before 4.4 (issued in #404)
https://github.com/gfx/Android-Orma/compare/v4.2.3...v4.2.4
- #400: Upgrade ANTRL4 runtime to 4.7, requiring
diable "InvalidPackage"
in Android Lint
https://github.com/gfx/Android-Orma/compare/v4.2.2...v4.2.3
https://github.com/gfx/Android-Orma/compare/v4.2.1...v4.2.2
- #391: Fix lint errors with Android Gradle plugin v2.3.0
https://github.com/gfx/Android-Orma/compare/v4.2.0...v4.2.1
- #389: Built with Android Gradle plugin v2.3.0 and fixed usage of
@RestrictTo
https://github.com/gfx/Android-Orma/compare/v4.1.1...v4.2.0
- Confenience
Relation#upsert()
is now available!
- #382: Fix NPE in
Relation#upsert(Model)
-
#379:
Relation#upsert(Model)
to "UPDATE or INSERT", working recursively on associations- And thus deprecate
Relation#upserter()
because it's confusing. Useinserter(OnConflict.REPLACE)
or#upsert(Model)
instead.
- And thus deprecate
-
#377:
Schema#getPrimaryKey
holds the boxed type of the primary key, instead of wildcard type
https://github.com/gfx/Android-Orma/compare/v4.1.0...v4.1.1
https://github.com/gfx/Android-Orma/compare/v4.0.2...v4.1.0
- #358: Composite Indexes (a.k.a. Multi-column Indexes)
https://github.com/gfx/Android-Orma/compare/v4.0.1...v4.0.2
- #354: Upgrade ANTLR4 from 4.5.3 to 4.6, which might affects migration engines
https://github.com/gfx/Android-Orma/compare/v4.0.0...v4.0.1
- #351: Fix "ambiguous name" errors in Relation
https://github.com/gfx/Android-Orma/compare/v3.2.1...v4.0.0
The following change list includes changes in v4 release candidates.
- #338: EXPERIMENTAL
Relation#createQueryObservable()
for SQLBriteQueryObservable
, to observe data-set changed events
- #333: Add
OrmaDatabase#deleteAll()
- #336: Fix a bug that
for (T value : selector)
did not respect limit clauses
- #337: Remove
Selector#forEach()
because it's ambiguous toIterable#forEach()
implemented in API level 24. Just useIterable
interface forSelector
(andRelation
) - #327: Migration from RxJava 1.x to RxJava 2.x, including lots of incompatible changes
- #338: Experimental
Relation#createQueryObservable()
for SQLBriteQueryObservable
, to observe data-set changed events
- #333: Add
OrmaDatabase#deleteAll()
- #336: Fix a bug that
for (T value : selector)
did not respect limit clauses
- #337: Remove
Selector#forEach()
because it's ambiguous toIterable#forEach()
implemented in API level 24. Just useIterable
interface forSelector
(andRelation
)
Orma v4 introduces RxJava 2.x support, including lots of incompatible changes by dropping RxJava 1.x.
https://github.com/gfx/Android-Orma/compare/v3.2.1...v4.0.0-rc1
Please test a new version if you use RxJava 2.x.
- #326: Square brackets were not supported as escape characters
- #328: Generic type adapters, in which deserializers take
Class<T>
as the second argument
https://github.com/gfx/Android-Orma/compare/v3.0.1...v3.1.1
- #325 Fix an issue that deeply nested models were not handled correctly (reported as #322)
- #318: Add
*Between(a, b)
helpers - #320: Add
Selector#pluckAsObservable<T>
(experimental) - #323: Add aggregate function helpers (sync version only for now)
- #315:
OrmaIterator
, created bySelector#iterator()
, ignoredORDER BY
terms (reported by @sys1yagi)
This is a major update of Orma, which includes lots of enhancements and bug fixes.
https://github.com/gfx/Android-Orma/compare/v2.6.0...v3.0.0
- Add
OrmaDatabase#prepareInsertInto${ModelClass}AsObservable
(#288) - Foreign Key Actions are now configuable (#306)
- Default to
@Column(onDelete = Column.ForeignKeyAction.CASCADE, onUpdate = Column.ForeignKeyAction.CASCADE)
- Default to
- Experimentally add
Selector#pluck()
to get the list of the specified column (#307)
- Fix #189 (by #291): A model can't have multiple direct associations with the same type
- This bug fixe includes the refactoring of
Schema
classes with incompatible changes on internal API
- This bug fixe includes the refactoring of
- Fix #292:
Relation#clone()
didn't copy its order specs. - Fix #293: The order of accessor methods did matter.
- Fix #295: foregin key storage types were not always associated table's primary key type, but BLOB
- Fix #301: nullable direct associations were instantiated with null fields
- Remove deprecated transaction mehods that use
TransactionTask
- Upgrade RxJavato 1.2.1, which includes incompatible changes on
@Experimental Completable
(now it gets@Beta
) - Use the original ANTLR4 instead of TunnelVisionLabs' ANTLR4 (#255)
- Android Gradle Plugin v2.1.x depends on TunnelVisionLabs', which conflicts with the original ANTLR4
- Android Gradle Plugin v2.2.x depends on the original ANTLR4, which conflicts with the TunnelVisionLabs'
Schema
classes have no longer static fields for column definitions; instead they are now instance fields (#291)- If you use
Model_Schema.column
, rewrite it toModel_Schema.INSTANCE.column
- If you use
- Foreign Key Actions are now configuable (#306)
- Add
Selector#pluck()
to get the list of the specified column (#307) Add(removed in v3.0.0)OrmaDatabase#rawQuery()
to executeSELECT
queries directly (#308)
- Fix #295: foregin key storage types were not always associated table's primary key type, but BLOB
- Fix #301: nullable direct associations were instantiated with null fields
- Fix #292:
Relation#clone()
didn't copy its order specs. - Fix #293: The order of accessor methods did matter.
- Make
Schema
constructors public to compile (degraded in v3.0.0-rc2, reported by @PtiPingouin)
https://github.com/gfx/Android-Orma/compare/v3.0.0-rc1...v3.0.0-rc2
The internal Schema
class has been re-designed from scratch.
It may include problems even if all the test cases are green.
Please give this release a try if you are interested in #189.
- Fix #189 (by #291)
https://github.com/gfx/Android-Orma/compare/v2.6.0...v3.0.0-rc1
This release includes incompatible changes.
You must upgrade Android Gradle Plugin to v2.2.0, and RxJava to v1.2.0.
- Add
OrmaDatabase#prepareInsertInto*AsObservable
(#288)
- Remove deprecated transaction methods
- Depend on RxJava to v1.2.0 to use the beta version of
Completable
- Use the original ANTLR4, which conflicts with Android Gradle Plugin v2.1.x
- Add a way to control helper methods by
@Column(helpers = ...)
(#282 by @jozn) - Reduce dependencies by replacing
support-v4
withsupport-compat
- Column names used in ORDER BY clauses were not fully qualified and might cause errors in queries (#277)
- Generic super classes caused compilation errors (#265)
- You can't use type parameters as the type of columns, though
- Nullable direct associations uses LEFT JOIN in select statements (#262 reported by jamesem)
- Fix a bug that
writeOnMainThread
was ignored (#261 by kyokomi)
- Fix a bug that the annotation processor can't find the getters and setters even if
@Column#name
was set (#259)
- Fix a bug that
UPDATE
statements were not traced (#245)
- Fix a bug that
ModelUpdater#field()
did not acceptnull
even if the field is declared as nullable (reported by twitter:okugawa3210)
- Exclude
org.abego.treelayout
, which is an ANTLR4 dependency but isn't available for Android
- Fix code generation failures with a model having the
@Setter
constructor and setters (#251)
- Fix code generation failures with a model having the same-named setters and getters (#248, #250)
- Fix
groupBy()
with conditions (#246, #247 by @daisuke-nomura)
No code change. Just for repackaging the AARs.
Here is the difference: v2.3.5...v2.4.0
Relation#reload(Model)
to reload a model- the model must have the primary key
OrmaDatabase#transactionSync(Runnable)
to take lambda expressionsOrmaDatabase#transactionAsync(Runnable) -> Completable
to handle transaction completion@StaticTypeAdapters
as a container of@StaticTypeAdapter
- See README.md for usage
- Lots of refactoring
OrmaAdapter
crashed if conditions were set (#229, reported as #227 by @gen0083)
- Setter and getter names were not used when field names didn't match accessor names (#224, reported as #222 by @gen0083). Now accessor names have to match field names, not database column names by default.
SchemaValidator
did not look at model inheritance, which caused errors if a derived model had no columns even if it inherited columns from superclasses (#221, reported as #220 by @keima)
- Fixed ArrayIndexOutOfBoundsException with convertToArgs() (#218 by @jmatsu)
- There are some cases where queries for direct associations not working (#216)
- Orma models now inherit @Columns from superclasses, which must not have @Table, though. Note that STI (single table inheritance) is not (and won't be) supported.
This release has no new feature, but because of lots of internal changes the minor version increases.
SchemaDiffMigration
becomse more stable, usingPRAGMA schema_version
to check whether migartion is required or not.- The AAR bundles proguard config, which was broken in the past versions
SchemaDiffMigration
usesSQLiteParser
to parseCREATE INDEX
statements to parse them correctlyOrmaDatabase#new${Model}FromCursor()
to retrieve a model from a cursor, deprecating#load${Model}fromCursor()
@Database
annotation to configureOrmaDatabase
package, class name, and handling model classes (#207, fix #115)ManualStepMigration.Helper#renameColumn()
to rename columns easily
- Nested direct associations work properly
Relation#indexOf()
works for columns with type serializersSelector#executeAsObservable()
checksisUnsubscribed()
(#209, fix #202)
- Backquotes are used to escape identifiers to get readability, instead of double quotes defined in SQL92 standard
OrmaConnection
no longer depends onSQLiteOpenHelper
to control migration more precisely- Now
OrmaConnection
always invokesMigrationEngine#start()
even for initialization - Now there is no difference between debug build and release build
- Now
- Fix SQL syntax errors in
AbstractMigrationEngine#transaction()
(#193)
- Fix name conflicts on query helpers (#190)
- This is a temporary fix, though. See #189.
- Fix syntax errors on multiple associations in a table
- Disable SQLite
foreign_key
in migration to avoid crashes - Use SQLiteDatabase#setForeignKeyConstraintsEnabled() if API version >= 16
- Fix SchemaDiffMigration issues on foreign-key constraints(#185)
- Fix NPE when migration is invoked with default settings (#184)
- Missing find-by-foreign-key for associated models (#183)
- Fix NPE when direct associations has no primary keys (#182)
This version includes incompatible changes.
- Migration API has been re-designed. See
README.md
for details - Hash base migration triggers (#165)
- Migration does no longer depend on
SQLiteOpenHelper
- Migration does no longer depend on
migration.TraceListener
(#170)- Add
OrmaDatabase#migrate()
(#171) - Support direct associations. Now a model can have another model directly (#175)
- Remove dynamic type adapters ( #172)
- Remove
Selector#empty()
; use#isEmpty()
instead (#173) - Remove
SingleAssociation#single()
; use#observable()
instead (#173) - Change
Observable<Integer> countAsObservable()
toSingle<Integer> countAsObservable()
for consistency (#173) - Re-design the API of
Schema
to support direct associations (#175)
- Suppress warnings on varargs (#179)
There are lots of changes in this version:
- Removed useless transactions, which might cause dead locks (#150)
OrmaConnection#createModel()
did not work for models with non-auto primary keys (#159)
- Built-in type adapters:
ArrayList<String>
andHashSet<String>
(#151) - Added
Selector#isEmpty()
and deprecatedSelector#empty()
(#152) SingleAssociation<T>
is now Gson-serializable (#155, #156)SingleAssociation<T>
is now Parcelable (#160)UPSERT
support, includingRelation#upserter()
(#158)
- Fix an NPE when a
@Nullable Boolean field
isnull
(#148)
@Setter
constructors with@Nullable
fields did not work (#146, #147)- Empty
@Setter
constructors should have made compile errors (#145)
- Make
@Setter(name)
for constructors work (#139, #140) - Workaround for Kotlin apt (kapt) issues (#138)
- Introduce Static type adapters by
@StaticTypeAdapter
(#131)- The best-matched SQLite storage type is adapted
- e.g.
INTEGER
forjava.util.Date
,BLOB
forjava.nio.ByteBuffer
- e.g.
- Custom binary classes (e.g.
ByteBuffer
,Bitmap
) are handled correctly- v1.0.0 can't use binary objects except for
byte[]
- v1.0.0 can't use binary objects except for
- See
README.md
for details
- The best-matched SQLite storage type is adapted
- Use
com.tunnelvisionlabs:antlr4:4.5
instead oforg.antlr:antlr4:4.5.1
because Android DataBinding 1.1 depends on com.tunnelvisionlabs's runtime which conflicts on org.antlr's runtime (#133)
- Follow the
trace
flag in all the logs (#130) - Use
info
log level for all the migration logs (#130)
- For SchemaDiffMigration to use the same versioning logic as OrmaMigration (#129)
- Set application's VERSION_CODE to
OrmaMigration.Bulder#manualStepMigrationVersion()
by default
This release includes new features and bug fixes.
OrmaMigration.Builder
(#128)Relation#getOrCreate(int, ModelFactory<T>)
(#127)Selector#empty()
to check a relation is empty or not (#120)DatabaseHandle
interface whichOrmaDatabase
implements (#118)
- Queries for
SingleAssociation<T>
were broken (#125) OrmaConnection#resetDatabase()
did not work (#123)
No code change from v1.0.0.
- Bundles
proguard-rules.pro
in AAR, in order to work with ProGuard more easily. Use-keepattributes Signature
if you set up proguard config manually. (#117)
- The initial stable version