Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eea3a44

Browse files
Merge pull request vapor#76 from MihaelIsaev/master
Allow to create model with pre-given UUID idKey
2 parents b5da9d5 + d3aef45 commit eea3a44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Sources/FluentPostgreSQL/PostgreSQLDatabase+QuerySupporting.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ extension PostgreSQLDatabase: QuerySupporting {
105105
{
106106
switch event {
107107
case .willCreate:
108-
if M.ID.self == UUID.self {
108+
if M.ID.self == UUID.self, model.fluentID ==nil {
109109
var model = model
110110
model.fluentID = UUID() as? M.ID
111111
return conn.future(model)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /