A list of breaking / major changes by version.

1.0

Interfaces Can Now Note If Their ID Autoincrements

Autoincrement defaults to true if missing. So any models without auto-incrementing keys will need to change to specifically name them as such.

You can now add the id field to attr_columns even if the ID field autoincrements. Which means that you can refer to the id field by name as an attribute instead of using @model_id, if you want.

Some minor changes that arise from this:

Connection Objects

This is technically not a breaking change. No existing code needs to be rewritten; interfaces create connection objects for you if you don't use them. But, this is a really big change internally, and as such I would be surprised if it didn't effect existing < 1.0 code.

This counts double if you use PgInterface and TdsInterface, since these are now being served one connection per thread and are finally really threadsafe.

NullInterface

The behaviour of NullInterface has changed. Prior to 1.0 it did not simulate an auto-incrementing ID field. Now it does, and that behaviour is the default.

Existing code that assumes the previous behaviour should be fixed by setting the id_ai attribute to false:

ifce = NullInterface.new(:code, :name, [])
ifce.id_ai = false
set_interface ifce

DSL To Declare a Custom List Method

This is provided by the new Tweaking mixin, so it's not a breaking change.

Model Status :empty

This has been renamed to :unknown to reflect that it is also the status of objects created by list; :unknown means that validation has not been run yet. This definitely counts as a breaking change, although you would only be effected if you were testing for :empty in a model...

0.10.1

Validate Method Takes A Parameter

You now need to give your validate method a parameter, the operation that is being validated – one of :create :read :update or :delete.

In fact you could optionally do this since 0.9. But in 0.10.1 we removed the slightly confusing feature where if validation failed on a delete, we deleted the record anyway. So 0.10.1 marks the point where, for all practical purposes, you have to give your method a parameter and check it at least for :delete.

Models that don't do this will not allow deletion of records that fail validation, which presumably is an anti-feature for you.