jfburdet
01/13/2020, 2:37 PMSELECT p.id, p.title
FROM Publication p
JOIN (
SELECT psc.publicationId, psc.publicationStateId ,max(psc.id)
FROM PublicationStateChange psc
GROUP BY psc.publicationId
) lastpsc ON p.id = lastpsc.publicationId and lastpsc.publicationStateId = ps.id
JOIN PublicationState ps ON ps.id = lastpsc.publicationStateId
WHERE ps.tag = "new"
;
SackCastellon
01/13/2020, 11:03 PM.idea/codeStyles/
and .idea/inspectionProfiles/
Rodrigo Silva
01/17/2020, 1:00 PMsavrov
01/20/2020, 11:08 AMdeleteAll()
the PK value is not reseted to 0. Is there a way to do it?Timur Atakishiev
01/23/2020, 11:42 AMSlackbot
01/26/2020, 6:34 AMcesards
01/27/2020, 4:17 AMRay Eldath
01/28/2020, 4:24 PMInvalid argument value: <http://java.io|java.io>.NotSerializableException. Statement(s): null
when using Exposed DAO? i got this when tried to create
val created = User.new {
username = "Ray Eldath"
email = "<mailto:xxx@xxx.com|xxx@xxx.com>"
}
Authorization.new {
user = created
hashedPassword = hp.toBlob()
role = UserRole.Root
}
in which Authorization.id
is refer to User.id
. any idea on this exception?
many thanks. 🙃Egor Babarykin
01/29/2020, 3:43 PMobject EventTable : Table("event") {
val id: Column<String> = varchar("id", 255)
val eventType: Column<EventType> = enumerationByName("type", 255, EventType::class)
val event: Column<Event> = jsonb("event", objectMapper)
override val primaryKey = PrimaryKey(id, eventType)
}
Timur Atakishiev
01/30/2020, 8:53 AMCarter
01/30/2020, 8:06 PMNikky
01/31/2020, 10:53 AMAbby
01/31/2020, 4:14 PMTimur Atakishiev
02/03/2020, 8:09 AMupdate some_table set is_deleted = true where id in (:some_list)
tjohnn
02/04/2020, 11:36 AMProducts.select{ whereRaw("where array_to_string('some_psql_array_column') LIKE '%search%'") }
CC @tapacWilliam Skinner
02/06/2020, 7:11 PMnextval('job_info_seq')
Neil Hart
02/07/2020, 7:36 PMSackCastellon
02/07/2020, 9:58 PMLiteralOp
and QueryParameter
?
LiteralOp
converts the specified value
to a SQL value using the specified columnType
, and QueryParameter
, when the query uses a prepared statement, adds a ?
for each value and then injects the actual value, and when it is not prepared, just works like the LiteralOp
?SrSouza
02/09/2020, 1:10 PMexidnus
02/09/2020, 4:39 PMLessons.update(where = { Lessons.id eq lessonId }) {
with(SqlExpressionBuilder) {
it.update(column, column + "$entityId$ELEM_COLLECTION_SEPARATOR")
}
}
But it throws exception
Caused by: org.h2.jdbc.JdbcSQLFeatureNotSupportedException: Feature not supported: "VARCHAR +"; SQL statement:
UPDATE LESSONS SET CAME_STUDENTS=LESSONS.CAME_STUDENTS+? WHERE LESSONS.ID = ?
Exposed version 0.20.3.
Oh, sorry to bother, I understood, that I should just use SqlExpressionBuilder.concat(column, stringLiteral("$entityId$ELEM_COLLECTION_SEPARATOR"))Nikky
02/11/2020, 12:25 PMDatabase.connect
without registering the database globally ?
is there a alternative to the ThreadLocalTransactionManager
?SrSouza
02/16/2020, 11:50 AMjava.lang.IllegalStateException: No transaction in context.
at org.jetbrains.exposed.sql.transactions.TransactionManager$Companion.current(TransactionApi.kt:92) ~[nations-spigot-0.1.0-SNAPSHOT-all.jar:?]
at org.jetbrains.exposed.dao.EntityClass.warmCache(EntityClass.kt:24) ~[nations-spigot-0.1.0-SNAPSHOT-all.jar:?]
at org.jetbrains.exposed.dao.EntityClass.testCache(EntityClass.kt:73) ~[nations-spigot-0.1.0-SNAPSHOT-all.jar:?]
at org.jetbrains.exposed.dao.EntityClass.findById(EntityClass.kt:42) ~[nations-spigot-0.1.0-SNAPSHOT-all.jar:?]
at org.jetbrains.exposed.dao.EntityClass.findById(EntityClass.kt:33) ~[nations-spigot-0.1.0-SNAPSHOT-all.jar:?]
at org.jetbrains.exposed.dao.Entity.getValue(Entity.kt:55) ~[nations-spigot-0.1.0-SNAPSHOT-all.jar:?]
at com.zentrymc.nationsapi.database.tables.Account.getSettings(Accounts.kt) ~[nations-spigot-0.1.0-SNAPSHOT-all.jar:?]
Nikky
02/17/2020, 9:27 AMNikky
02/17/2020, 12:02 PMTimur Atakishiev
02/20/2020, 8:46 AMselect max(age) from users
How can I get the eldest users with exposed?Timur Atakishiev
02/21/2020, 5:08 AMselect *
from users
where age = (select max(age) from users)
jackxu
02/24/2020, 12:01 PMbatchinsert
?robin
02/24/2020, 3:38 PMReuben Jacobs
02/24/2020, 5:13 PMasad.awadia
03/04/2020, 1:11 AM