Vinicius Araujo
06/13/2019, 4:52 PMKevin Schmeichel
06/13/2019, 5:51 PMtjohnn
06/14/2019, 2:07 PMExposed can eager load them at the time of the parent query, this is prevents the classic "N+1" problem as references can be aggregated and loaded in a single query
Does it mean only one query would be made to database to query the parent and its child references?Mihael
06/14/2019, 3:01 PMday(date_time)
equivalent in exposed?tjohnn
06/16/2019, 3:11 PMval id = Roles.insertAndGetId { it[name] = ROLE_ADMIN;it[createdAt] = DateTime.now();it[updatedAt] = DateTime.now() }
Then any attempt to insert a user with the role like this:
UserEntity.new {
email = "<mailto:admin@test.com|admin@test.com>"
roleId = id
emailVerified = true
password = 'password'
createdAt = DateTime.now()
updatedAt = DateTime.now()
}
I get the following error:
INFO Exposed - Transaction attempt #2 failed: Invalid argument value: java.io.NotSerializableException. Statement(s): null
Vinicius Araujo
06/17/2019, 6:39 PMColumn<EntityId<UUID>>
is different from Column<UUID>
Kevin Schmeichel
06/18/2019, 10:46 PMModuleVersionNotFoundException
when I try to upgrade.Mihael
06/24/2019, 8:37 AMif (Table(tableName).exists()) {
?spand
06/26/2019, 7:41 AMSqlExpressionBuilder
somehow ?bitkid
06/27/2019, 9:38 PMlenqnr
06/30/2019, 9:12 AMUNION
operator with Exposed DSL? I want to execute something like:
SELECT MAX(views) FROM (
SELECT views FROM articles WHERE user_id = 1
UNION ALL
SELECT views FROM comments WHERE user_id = 1
) as writings
runjorel
07/01/2019, 7:39 PMrunjorel
07/07/2019, 6:15 AMUPDATE Users SET active=false WHERE id IN (SELECT user_id FROM deactivated)
It seems the only option I have is inList
but I am afraid if I call map{..}/toList()
on my subquery it would materialize those results.runjorel
07/08/2019, 3:24 PMsuspendedTransaction
. Whenever I try to call another suspending function within a suspendingTransaction, I am getting an error about coroutine contexts. Is that not allowed?SrSouza
07/08/2019, 10:54 PMbitkid
07/09/2019, 9:44 PMDatabase.connect(datasource = HikariDataSource(poolConfig),
manager = { ThreadLocalTransactionManager(it, Connection.TRANSACTION_REPEATABLE_READ, 0) })
tjohnn
07/11/2019, 1:35 PMKotlinNullPointerException
whenever I attempt to use it for inserting a new data which doesn't have an id, the id being null is the cause of the error based on what I see so far, the id is auto_increment so I cannot set it explicitly, is there a way for me to fix this or Am I doing something wrong?vagarwala
07/11/2019, 8:20 PMrunjorel
07/12/2019, 7:33 PMbatchInsert
for a List<T>
because batchInsert
will only accept a List<Any>
. Anyone else with that issue?Hamza
07/13/2019, 1:08 PMCaused by: org.postgresql.util.PSQLException: This ResultSet is closed.
which is quite curious
Database.connect(
url = "jdbc:<postgresql://localhost:5432/library>",
user = "hm",
password = "wouldn't u like to know",
driver = "org.postgresql.Driver"
)
transaction {
Books.select { Op.TRUE }.forEach(::println)
}
jeggy
07/15/2019, 2:53 PMjava.lang.IllegalStateException: transaction.connection.catalog must not be null
Anyone that can help me here? what do I need to make sure that when Exposed is calling getDatabase
it won't return null
?tapac
07/17/2019, 8:22 PMconnection is closed
exception when using suspended transactions.
suspended functions was changed a bit, documentation will be actualized soon.Rodrigo Silva
07/21/2019, 12:22 PMmp
07/23/2019, 1:39 PMHamza
07/25/2019, 11:11 AMSrSouza
07/26/2019, 8:21 PMPolis Gints
08/06/2019, 12:02 PMKevin Schmeichel
08/06/2019, 5:06 PMLuis Munoz
08/09/2019, 3:22 PMShawn A
08/19/2019, 8:05 PMDatabase.connect
. I think it should be called one time when the application starts. But after I call it, do I need to reference it to interact with the db
. All the examples I've seen don't use the Database
object directly. How do the table objects get a handle to the current Database
?