Release v0.4.0
What's new?
One Relationship type to rule them all.
What's Changed
- Refactoring to single relationship by @KazaiMazai in #49
- Relationship wrapper minor fix and readme update by @KazaiMazai in #50
- Add protocol description to readme by @KazaiMazai in #51
Full Changelog: 0.3.0...0.4.0
Breaking changes
Old relation property wrappers are not available any more. @Relationship
should be used instead:
Before
//To-one optional:
@HasOne
var user: User? = nil
//To-one required:
@BelongsTo
var author: User?
//To-many:
@HasMany
var viewedBy: [User]? = nil
//Mutual relation:
@HasMany(\.chat, inverse: \.messages)
var chat: Chat?
Now
//To-one optional:
@Relationship
var user: User? = nil
//To-one required:
@Relationship(.required)
var author: User?
//To-many:
@Relationship
var viewedBy: [User]? = nil
//Mutual relation:
@Relationship(inverse: \.messages)
var chat: Chat?