Renaud
02/02/2022, 6:26 PMgiven_name
. Using Flyway, I’ve successfully added this new attribute to my table (I can see it using a DB file explorer) and I have added the following line :
object MyTable : ExtendedUUIDTable("whateverTable") {
...
val givenName: Column<String> = text("given_name")
}
When I try to use this field, I get the following exception :
java.lang.IllegalStateException: com.innovorder.server.data.model.WhateverTable.given_name is not initialized yet
I found that Exposed is missing some wiki pages regarding doing DB migration. Did someone run into this error as well?Phil Richardson
02/03/2022, 4:45 PMnull
for this this due to the lack of initialization?
If they are null
as I suspect could be the case, you have a two options.
1: Make the column nullable
in your Table object, i.e. val givenName: Column<String> = text("given_name").nullable()
2: Leave the column as not nullable, but have a client side default val givenName: Column<String> = text("given_name").clientDefault("")
Renaud
02/04/2022, 9:11 AM