You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
object PropName : Table("tblProperty") {
val id = integer("id").autoIncrement().primaryKey()
val name = varchar("name", 50).uniqueIndex()
}
propNameId = PropName.insert {
it[name] = aname
} get PropName.id
I want a logic
if name exists
return id
else
do insert and return id
is there any simple way to write code?
The text was updated successfully, but these errors were encountered:
object PropName : Table("tblProperty") {
val id = integer("id").autoIncrement().primaryKey()
val name = varchar("name", 50).uniqueIndex()
}
propNameId = PropName.insert {
it[name] = aname
} get PropName.id
I want a logic
if name exists
return id
else
do insert and return id
is there any simple way to write code?
The text was updated successfully, but these errors were encountered: