Skip to content

Commit

Permalink
Merge branch 'release/1.0.0-beta.2' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Emil Persson committed Nov 5, 2015
2 parents 2334a60 + 40f0293 commit a795e2f
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 1 deletion.
82 changes: 82 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,88 @@ This Changelog tracks changes in all releases across the [dart-bridge](https://g

---

## [framework](https://github.com/dart-bridge/framework)/1.0.0-beta.2
This release fixed some bugs, but mainly it's accounting for breaking changes in Trestle.

### Changes
* [`bridge.database`] Updated to Trestle 0.6.0.

### Bug fixes
* [`bridge.view`] Fixed a bug where line breaks in template cache wasn't being accounted for on Windows.

## [trestle](https://github.com/dart-bridge/trestle)/0.6.0
This release of Trestle introduces relationship annotations, value object models, and some other changes.
See the Readme over at [the Trestle repo](https://github.com/dart-bridge/trestle#orm).

### Changes
* `Repository#add`, `Repository#addAll`, and `Repository#update` are now deprecated, in favor of the unified
`Repository#save` and `Repository#saveAll` methods.

* Repositories can now use value objects as models:

```dart
// These three are somewhat equivalent.
class DataStructure { String name; }
class ValueObject {
final String name;
const ValueObject(this.name);
}
class SomeModel extends Model { @field String name; }
```

### Breaking changes
* The Gateway is now being passed into Repositories in the constructor (only breaking for people using Trestle
without Bridge).

```dart
// 0.5.8
new Repository<MyModel>()
..connect(gateway);
// 0.6.0
new Repository<MyModel>(gateway);
```

* Model fields are now automatically snake cased, which may only be an issue if a field like `myField` correlates
with a table column in the same format. After updating to `0.6.0`, that field would be expected to map over to a
column called `my_field`.

```dart
class MyModel extends Model {
// These are superfluous
@field String my_field;
@Field('my_field') String myField;
// This is the correct format
@field String myField;
}
class MyDataStructure {
// Superfluous
String my_field;
// Correct
String myField;
}
```

* Overridden table names are now stored on the model class instead of as a Repository getter.

```dart
// 0.8.5
class MyRepository extends Repository<MyModel> {
String get table => 'overridden_table';
}
// 0.6.0
class MyModel {
static const table = 'overridden_table';
}
```

## [framework](https://github.com/dart-bridge/framework)/1.0.0-beta.1
The beta release of Bridge marks the beginning of this Changelog. Refer to
[dart-bridge.io/docs](http://dart-bridge.io/docs) for documentation up to this point.
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: bridge
description: Extensible end-to-end framework
author: Emil Persson <emil.n.persson@gmail.com>
version: 1.0.0-beta.1
version: 1.0.0-beta.2
homepage: http://dart-bridge.io
environment:
sdk: ">=1.12.0 <2.0.0"
Expand Down

0 comments on commit a795e2f

Please sign in to comment.