Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Preparation of version 1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Alban Jubert committed Nov 3, 2017
1 parent f9d4b64 commit f1aea75
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Yii2 Active Record Save Relations Behavior Change Log

## [1.3.2]
### Fixed
- Bug #22: Fix for HasOne relation pointing to the owner primary key (thx @mythicallage)

## [1.3.1]
### Added
- Enh #19: Support for defining relations through the `getRelation` method (thx @execut)
Expand Down
5 changes: 4 additions & 1 deletion tests/models/UserProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ public static function tableName()
public function rules()
{
return [
['bio', 'required']
[['user_id'], 'integer'],
['bio', 'required'],
[['user_id'], 'unique'],
[['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::className(), 'targetAttribute' => ['user_id' => 'id']]
];
}

Expand Down

0 comments on commit f1aea75

Please sign in to comment.