Skip to content
Frans Bouma edited this page Dec 28, 2015 · 19 revisions

Welcome to the Massive wiki!

Breaking Changes in v2.0

The following (breaking) changes have been made in v2.0

  • table.DefaultValue(column) has been removed; it was of no use, the method required a column instance but there was no way to obtain one.
  • table.DefaultValue(string) has been added. string is the name of the column to return the default value for the column with the name specified.
  • (SQL Server) table.DefaultValue(string) returns a DateTime value now if the default value is getdate() or equivalent.
  • (SQL Server) By default, SCOPE_IDENTITY() is used for sequenced fields. If a field should be sequenced using another sequence, e.g. @@IDENTITY, specify it as an appsetting in the config file using 'default-seq' as setting name, or specify it as the value of primaryKeyFieldSequenceName in your call to the DynamicModel constructor. This is now in line with the code for the other DBs. If you set this to "" or string.Empty, be aware that you can't bulk-insert using Save(objects), as Save(objects) always creates update queries from objects which have their primary key field set to a value. Instead, use the new SaveAsNew method (see below)
  • DynamicModel.SaveAsNew(params object[]) has been added. This method acts like DynamicModel.Save(params object[]) but creates insert statements for each element, regardless whether it has a pk field set or not. If the PK field is sequenced/identity, the value inserted isn't read back.
  • (Oracle) the DynamicModel ctor parameter sequence is now called primaryKeyFieldSequenceName.
  • DynamicModel.ValidateIsCurrency has been removed as its original code was buggy and it's not really testing for currency, but for decimal and doesn't do a scale check (i.o.w.: everyone who uses it runs into bugs). See issue #233
  • DynamicModel.ConnectionString property has been added, to set the connection string at runtime without using a config file.
Clone this wiki locally