tapac
06/14/2018, 10:48 AMsamir
06/20/2018, 9:51 AMmkporwit
06/22/2018, 12:42 AMonDelete = ReferenceOption.CASCADE
for foreign key constraints. Is there support for something like MySQL’s ON UPDATE CASCADE
?frellan
06/22/2018, 9:43 PMentity.otherEntites
but rather DB.getOtherEntetiesFor(entity)
or similar. How do you do this, need tips 🙂mkporwit
07/02/2018, 7:03 PMcharacterEncoding
or the characterSetResults
. Exposed blows up with an ExceptionInInitializedError
. If characterSetResults=utf8mb4
is specified on the connect string, the underlying exception is java.sql.SQLException: Can't map utf8mb4 given for characterSetResults to a supported MySQL encoding.
, and if I do characterEncoding=utf8mb4
, it is java.sql.SQLException: Unsupported character encoding 'utf8mb4'
.Sherub Thakur
07/04/2018, 8:55 AMExposedSQLException
)? Right now I have to do string processing on the message given by the exception to perform any task. Something like RefrentialIntegrityConstraintViolationException
or UniqueConstraintViolationException
etc would be really helpful.bubakovsky
07/08/2018, 5:46 PMdata class
in higher tiers. Only possible way I could come up with is to create Map
for every 1:N relationship, which might be very monstrous in the end. How do you usually deal with that? Thanks for the reply in advance!mkporwit
07/17/2018, 5:42 PMNorg
07/23/2018, 2:33 PMtapac
07/28/2018, 12:28 PMSo first, how the heck does this even work? I can’t seem to figure it out from reading the source.inList and other functions declared within SqlExpressionBuilder that’s why you can’t access them out of select {} block, which defined as :
inline fun FieldSet.select(where: SqlExpressionBuilder.()->Op<Boolean>)
v79
07/29/2018, 7:37 PMabstract class BaseTable : LongIdTable() {
val createdOn = datetime("createdOn")
val lastUpdatedOn = datetime("createdOn")
}
object Page : BaseTable() {
val name = varchar("name",255)
.... *etc*
v79
08/04/2018, 8:15 AMreferrersOn
, when to use referencedOn
? What's wrong with hasOne
, hasMany
? The DSL syntax is so much cleaner, but isn't really an ORM. Why a class and an object? And why do I only have to set up the relationship between two tables on three of these?nekoinemo
08/13/2018, 9:05 AMbatchInsert()
, requests printed in console are all separate inserts rather than INSERT INTO table (col1, col2) VALUES (val11, val12), (val21, val22), (val31, val32)
. Am i misunderstanding how batch supposed to work in Exposed?nekoinemo
08/14/2018, 7:38 PMGerard Downes
08/15/2018, 1:24 PMBorzdeG
08/21/2018, 2:59 PMSELECT IF(myTableColumn<2 OR myTableColumn>4, TRUE, FALSE) as myColumn FROM myTable;
jonathan
08/26/2018, 10:57 PMSELECT requested.GroupId, requested.Member, requested.isAdmin, requested.isOwner
FROM GroupMembers requested, GroupMembers requestor
WHERE requested.GroupId = 1 AND requested.Member = 1 AND requestor.GroupId = 1 AND requestor.Member = 2
zpearce
08/29/2018, 11:10 PM-Duser.timezone=UTC
?spand
09/03/2018, 9:53 AMUSE INDEX
been considered ?zpearce
09/11/2018, 3:09 PMtransaction
function that takes a lambda?oshai
09/11/2018, 7:07 PMbarrongineer
09/19/2018, 8:20 PMSep 19, 2018 3:54:51 PM tornadofx.DefaultErrorHandler uncaughtException
SEVERE: Uncaught error
java.lang.IllegalStateException: No transaction in context.
mkporwit
09/19/2018, 11:50 PM0.10.4
to 0.10.5
, does anyone here have theories as to why this update would fail? There are no changes in the code, just the version change. The failure is in integration tests that start with a clean database every time. This is on a MySQL instance:
2018-09-19 16:41:39.502 [io-thread-1] INFO Exposed - Transaction attempt #0 failed: java.sql.BatchUpdateException: Cannot add or update a child row: a foreign key constraint fails (`authdb`.`Roles`, CONSTRAINT `Roles_ibfk_1` FOREIGN KEY (`orgId`) REFERENCES `Orgs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE). Statement(s): INSERT INTO Roles (name, orgId, permissions) VALUES (?, ?, ?);
INSERT INTO Roles (name, orgId, permissions) VALUES (?, ?, ?);
INSERT INTO Roles (name, orgId, permissions) VALUES (?, ?, ?);
INSERT INTO Roles (name, orgId, permissions) VALUES (?, ?, ?)
org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.BatchUpdateException: Cannot add or update a child row: a foreign key constraint fails (`authdb`.`Roles`, CONSTRAINT `Roles_ibfk_1` FOREIGN KEY (`orgId`) REFERENCES `Orgs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)
Hullaballoonatic
09/24/2018, 8:59 PMoperator fun contains(username: String): Boolean = UserEntity.find { self.username eq username }.count() > 0
operator fun contains(email: Email): Boolean = UserEntity.find { self.email eq email }.count() > 0
also if there's a more efficient way to write a contains function, i wouldn't be surprised in the slightestDarren Gaughan
10/01/2018, 10:16 PMfranek
10/05/2018, 8:34 AMfranek
10/08/2018, 8:18 PMHamza
10/21/2018, 12:03 PMval jdbc = "jdbc:mysql://$user:$pass@$url"
Database.connect(jdbc, driver)
with com.mysql.cj.jdbc.Driver
as driver, and url being [redacted]:3306/[databaseName]
APXEOLOG
10/21/2018, 1:28 PMAPXEOLOG
10/25/2018, 7:15 AMSELECT ... IN
but using composite key with 3 fields?APXEOLOG
10/25/2018, 7:15 AMSELECT ... IN
but using composite key with 3 fields?tapac
10/25/2018, 10:11 AMAPXEOLOG
10/25/2018, 11:13 AMSELECT *
FROM table_name
WHERE (key_part_1, key_part_2) IN ( ('B',1), ('C',2) );
inList
function of the SQL builder but i'm not that good at kotlin to make something similar for multiple column casetapac
10/25/2018, 11:23 AMAPXEOLOG
10/25/2018, 1:09 PM