diff --git a/Package.swift b/Package.swift index 150cc68..3a72c7f 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.2 +// swift-tools-version:5.4 import PackageDescription let package = Package( @@ -10,7 +10,7 @@ let package = Package( .library(name: "FluentMySQLDriver", targets: ["FluentMySQLDriver"]), ], dependencies: [ - .package(url: "https://github.com/vapor/fluent-kit.git", from: "1.24.0"), + .package(url: "https://github.com/vapor/fluent-kit.git", from: "1.27.0"), .package(url: "https://github.com/vapor/mysql-kit.git", from: "4.0.0"), .package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), ], diff --git a/Sources/FluentMySQLDriver/FluentMySQLDatabase.swift b/Sources/FluentMySQLDriver/FluentMySQLDatabase.swift index 4266825..815cd6b 100644 --- a/Sources/FluentMySQLDriver/FluentMySQLDatabase.swift +++ b/Sources/FluentMySQLDriver/FluentMySQLDatabase.swift @@ -26,7 +26,7 @@ extension _FluentMySQLDatabase: Database { }, onMetadata: { metadata in switch query.action { - case .create: + case .create where query.customIDKey != .string(""): let row = LastInsertRow( metadata: metadata, customIDKey: query.customIDKey diff --git a/Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift b/Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift index 0666839..9e87d86 100644 --- a/Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift +++ b/Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift @@ -13,6 +13,7 @@ final class FluentMySQLDriverTests: XCTestCase { func testChildren() throws { try self.benchmarker.testChildren() } func testCodable() throws { try self.benchmarker.testCodable() } func testChunk() throws { try self.benchmarker.testChunk() } + func testCompositeID() throws { try self.benchmarker.testCompositeID() } func testCRUD() throws { try self.benchmarker.testCRUD() } func testEagerLoad() throws { try self.benchmarker.testEagerLoad() } func testEnum() throws { try self.benchmarker.testEnum() }