We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
@Entity
1 parent 12e579c commit 137f884Copy full SHA for 137f884
Sources/CoreModelMacros/Entity.swift
@@ -243,7 +243,11 @@ extension EntityMacro {
243
}
244
245
246
-
+
247
+ guard relationshipEntries.isEmpty == false else {
248
+ return DeclSyntax(stringLiteral: #"public static var relationships: [CodingKeys: Relationship] { [:] }"#)
249
+ }
250
251
let relationshipsDecl = """
252
public static var relationships: [CodingKeys: Relationship] {
253
[\n \(relationshipEntries.joined(separator: ",\n "))
0 commit comments