Commit 3010b8e 1 parent 0c9a435 commit 3010b8e Copy full SHA for 3010b8e
File tree 1 file changed +7
-1
lines changed
backend/people/src/main/kotlin/ru/ifmo/se/dating/people/storage/jooq
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,13 @@ class JooqPersonStorage(private val database: JooqDatabase) : PersonStorage {
21
21
database.only {
22
22
val record = draft.toRecord()
23
23
insertInto(PERSON )
24
- .values(record)
24
+ .set(PERSON .ACCOUNT_ID , draft.id.number)
25
+ .also { q -> draft.firstName?.text?.let { q.set(PERSON .FIRST_NAME , it) } }
26
+ .also { q -> draft.lastName?.text?.let { q.set(PERSON .LAST_NAME , it) } }
27
+ .also { q -> draft.height?.let { q.set(PERSON .HEIGHT , it) } }
28
+ .also { q -> draft.birthday?.let { q.set(PERSON .BIRTHDAY , it) } }
29
+ .also { q -> draft.facultyId?.number?.let { q.set(PERSON .FACULTY_ID , it) } }
30
+ .also { q -> draft.locationId?.number?.let { q.set(PERSON .FACULTY_ID , it) } }
25
31
.onConflict(PERSON .ACCOUNT_ID )
26
32
.doUpdate()
27
33
.set(record)
You can’t perform that action at this time.
0 commit comments