Closed
Description
Johan Blomgren opened DATAJDBC-623 and commented
I'm not sure if it's correct for me to post my improvement requests here?
But i would like to one of these, or both.
Example with kotlin/postgres
Define sequence generator
@Table("foo")
data class Foo(
@Id
val id: UUID,
@Sequence("external_id_seq")
val externalId: Long)
INSERT INTO foo(id, external_id) VALUES (?, nextval('external_id_seq')
or
Field uses default value if null
@Table("foo")
data class Foo(
@Id
val id: UUID,
@EmptyOnNull
val externalId: Long)
--Creates query, ignoring externalId since it should be empty if null.
INSERT INTO foo(id) values (?)
No further details from DATAJDBC-623