jetbrains / exposed Goto Github PK
View Code? Open in Web Editor NEWKotlin SQL Framework
Home Page: http://jetbrains.github.io/Exposed/
License: Apache License 2.0
Kotlin SQL Framework
Home Page: http://jetbrains.github.io/Exposed/
License: Apache License 2.0
Scenario:
val objs = PlannedActivity.all().forEach { act ->
activs.append("<b>"+act.id+"</b>: "+
act.members.joinToString { memb -> memb.user.psnName + " (@" + memb.user.telegramName + ")" }+
" going to " + act.activity.name + " " + act.activity.mode +
" at <b>" + formatStartTime(act.start) + "</b>\n")
}
members
and activity
are external fields causing another query:
object PlannedActivities : IntIdTable() {
val authorId = reference("author_id", Users)
val activityId = reference("activity_id", Activities)
}
class PlannedActivity(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<PlannedActivity>(PlannedActivities)
var author by User referencedOn PlannedActivities.authorId
var activity by Activity referencedOn PlannedActivities.activityId
val members by PlannedActivityMember referrersOn PlannedActivityMembers.plannedActivityId
}
object PlannedActivityMembers : IntIdTable() {
val plannedActivityId = reference("planned_activity_id", PlannedActivities)
val userId = reference("user_id", Users)
init {
index(true, plannedActivityId, userId)
}
}
SQL queries:
SQL: SELECT PlannedActivities.id, PlannedActivities.author_id, PlannedActivities.activity_id, PlannedActivities.details, PlannedActivities."start" FROM PlannedActivities
SQL: SELECT PlannedActivityMembers.id, PlannedActivityMembers.planned_activity_id, PlannedActivityMembers.user_id, PlannedActivityMembers.added FROM PlannedActivityMembers WHERE PlannedActivityMembers.planned_activity_id = 1
SQL: SELECT Users.id, Users.telegram_name, Users.telegram_id, Users.psn_name, Users.email, Users.psn_clan, Users.created_at, Users.updated_at, Users.deleted_at, Users.tokens, Users.pending_activation_code FROM Users WHERE Users.id = 2
The above query causes error with pgsql jdbc driver:
org.postgresql.util.PSQLException: This ResultSet is closed.
at org.postgresql.jdbc.PgResultSet.checkClosed(PgResultSet.java:2740)
at org.postgresql.jdbc.PgResultSet.next(PgResultSet.java:1817)
at org.jetbrains.exposed.sql.Query$ResultIterator.hasNext(Query.kt:211)
at org.jetbrains.exposed.sql.IterableExKt$mapLazy$1$iterator$1.hasNext(IterableEx.kt:107)
at kotlin.collections.CollectionsKt___CollectionsKt.joinTo(_Collections.kt:1922)
at kotlin.collections.CollectionsKt___CollectionsKt.joinToString(_Collections.kt:1943)
at kotlin.collections.CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:1942)
at org.aeriagloris.telegram.commands.ListCommand$execute$1.invoke(ListCommand.kt:24)
at org.aeriagloris.telegram.commands.ListCommand$execute$1.invoke(ListCommand.kt:14)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:69)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:57)
at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:48)
Any advice on a workaround?
Is there a way to order by on a text field in case insensitive?
In SQL I know 2 ways:
SELECT * FROM xxxxxx ORDER BY LOWER(yyyy)
SELECT * FROM xxxxxx ORDER BY yyyy COLLATE NOCASE
I would avoid to write plain SQL but I didn't find a dedicated method in this library, so if you have any workaround with the current version, I'm interested.
If it's not present in the library, maybe this ticket can be a good feature to add?
The problem is caused by InsertStatement and UpdateStatment have no common parent
fun assgin(it: InsertStatement, o: JsonObject) {
val cols = it.table.columns
for (col in cols) {
var type = col.columnType.sqlType()
val idx = type.indexOfAny(listOf(" ", "("))
type = if (idx > 0) type.substring(0, idx) else type
if (o.containsKey(col.name)) {
if (col.name == "hashedPassword") {
val p = o.getString("hashedPassword")
o.put("hashedPassword", createHashString(p))
}
when (type) {
"INT" -> it.set(col as Column, o.getInteger(col.name))
"VARCHAR" -> it.set(col as Column, o.getString(col.name))
"DATE" -> it.set(col as Column, formateDate(o.getString(col.name)))
"DECIMAL" -> it.set(col as Column, o.getDouble(col.name))
}
}
}
}
fun assgin(it: UpdateStatement, o: JsonObject) {
val cols = it.targetsSet.columns
for (col in cols) {
var type = col.columnType.sqlType()
val idx = type.indexOfAny(listOf(" ", "("))
type = if (idx > 0) type.substring(0, idx) else type
if (o.containsKey(col.name)) {
if (col.name == "hashedPassword") {
val p = o.getString("hashedPassword")
o.put("hashedPassword", createHashString(p))
}
when (type) {
"INT" -> it.set<Int>(col as Column<Int>, o.getInteger(col.name))
"VARCHAR" -> it.set<String>(col as Column<String>, o.getString(col.name))
"DATE" -> it.set<DateTime>(col as Column<DateTime>, formateDate(o.getString(col.name)))
"DECIMAL" -> it.set<Double>(col as Column<Double>, o.getDouble(col.name))
}
}
}
}
Hi, I am using latest version of exposed and I was getting following
warning WARN 70808 --- [pool-2-thread-1] Exposed : Long query: [2113ms] .
I am OK with my query taking more than 2 seconds to execute. But it looks like this is hard coded in Transaction.kt in variable warnLongQueriesDuration and I get exception. Can you make this configurable or is there any other way around.
Thanks
I'm trying to perform a limit
query against a Microsoft SQL Server database, but I'm getting a "No dialect registered for sqlserver" error. Exposed could use a SQLServerDialect class.
Would be nice to have Long support also to prevent any truncation.
Aggregate SQL functions such as sum, avg, max and such return NULL if there was no rows. Has this been considered ? It seems null
cannot be expressed currently and will show itself as a NPE with quite high surprise factor in the it[sumCol]
call.
val sumCol = TestTable.intCol.sum()
TestTable
.slice(sumCol)
.selectAll()
.map { it[sumCol] }
.firstOrNull()
*http://www.h2database.com/html/functions.html#sum
*http://dev.mysql.com/doc/refman/5.7/en/group-by-functions.html#function_sum
version - 7.4
Entity.kt:
infix fun referrersOn(column: Column<EntityID>) = referrersOn(column, false)
fun referrersOn(column: Column<EntityID<ID>>, cache: Boolean) = Referrers(column, this, cache)
fun optionalReferrersOn(column: Column<EntityID<ID>?>, cache: Boolean = false) = OptionalReferrers(column, this, cache)
OptionalReferrersOn is realized, but not availible
First, I've searched everywhere but couldn't find a forum / detailed guide on Exposed framework so I'm resorting to post an issue here.
How do you model a many-to-many relationship using the DAO (Entities) method? Take these models:
package abcd
import org.jetbrains.exposed.dao.*
import org.jetbrains.exposed.sql.*
object Tags : IntIdTable(name = "tags") {
val name = text("name")
}
object Posts : IntIdTable(name = "posts") {
val uploadDate = datetime("upload_date")
}
object PostsTags : Table(name = "posts__tags") {
val post = reference("post", Posts).primaryKey(0)
val tag = reference("tag", Tags).primaryKey(1)
}
class Tag(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<Tag>(Tags)
var name by Tags.name
}
class Post(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<Post>(Posts)
var uploadDate by Posts.uploadDate
val tags by Tag referrersOn PostsTags.tag // Obviously does not work. But how else?
}
How can I modify the Post
entity so it has a tags
property returning all tags associated to it through PostsTags
? val tags by Tag referrersOn PostsTags.tag
obviously doesn't work, and I couldn't find any similar alternative constructs.
In case such a scenario is not supported, how could one implement it? By looking on Referrers
implementation I've got a general grasp on how to do it, but I'm struck at how to return a SizedIterable
of tags from the results of a native SQL DSL query. Is there any mapping from SizedIterable<ResultRow>
to SizedIterable<Entity>
?
Do you plan to support a fixed length binary type?
It is currently difficult to use Exposed in real projects since there is no dependency available on Maven Central or other well known repository, leading to this kind of anti-pattern.
Could you please deploy exposed.jar
in Maven Central?
From Queries.kt
:
fun <T:Table> T.insert(body: T.(InsertStatement<Number>)->Unit): InsertStatement <Number> = InsertStatement<Number>(this).apply {
body(this)
execute(TransactionManager.current())
}
Trying to run the following:
val userId = Users.insert {
it[email] = "${UUID.randomUUID()}@example.com"
}.generatedKey
Results in the following error:
Exception in thread "main" java.lang.ClassCastException: org.jetbrains.exposed.dao.EntityID cannot be cast to java.lang.Number
The default insert statements should be updated for IDTables.
Outside of the samples there seems to be little to no documentation on the library.
What I haven't been able to figure out for example:
Using the DAO method, can I have the object extend Table() and set the primary key myself (say I have some kind of unordered UUIDs or something), if so how would that change the sample code.
There also isn't any kind of javadoc, which makes working with the library quite difficult.
version 7.4
import org.jetbrains.exposed.dao.EntityID
import org.jetbrains.exposed.dao.IntEntity
import org.jetbrains.exposed.dao.IntEntityClass
import org.jetbrains.exposed.dao.IntIdTable
import org.jetbrains.exposed.sql.Database
import org.jetbrains.exposed.sql.SchemaUtils.create
import org.jetbrains.exposed.sql.StdOutSqlLogger
import org.jetbrains.exposed.sql.transactions.transaction
object Users : IntIdTable() {
val name = varchar("name", 50).index()
val city = reference("city", Cities)
val age = integer("age")
}
object Cities: IntIdTable() {
val name = varchar("name", 50)
}
class User(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<User>(Users)
var name by Users.name
var city by City referencedOn Users.city
var age by Users.age
}
class City(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<City>(Cities)
var name by Cities.name
val users by User referrersOn Users.city
}
fun main(args: Array<String>) {
Database.connect("jdbc:h2:mem:test", driver = "org.h2.Driver")
transaction {
logger.addLogger(StdOutSqlLogger())
create (Cities, Users)
val stPete = City.new {
name = "St. Petersburg"
}
val munich = City.new {
name = "Munich"
}
User.new {
name = "a"
city = stPete
age = 5
}
User.new {
name = "b"
city = stPete
age = 27
}
User.new {
name = "c"
city = munich
age = 42
}
println("Users in ${munich.name}: ${munich.users.toList().joinToString {it.name}}")
println("Users in ${stPete.name}: ${stPete.users.joinToString {it.name}}")
println("Adults: ${User.find { Users.age greaterEq 18 }.joinToString {it.name}}")
}
}
Output:
SQL: CREATE TABLE IF NOT EXISTS CITIES (ID INT AUTO_INCREMENT PRIMARY KEY, NAME VARCHAR(50) NOT NULL)
SQL: CREATE TABLE IF NOT EXISTS USERS (ID INT AUTO_INCREMENT PRIMARY KEY, NAME VARCHAR(50) NOT NULL, CITY INT NOT NULL, AGE INT NOT NULL, FOREIGN KEY (CITY) REFERENCES CITIES(ID))
SQL: CREATE INDEX USERS_NAME ON USERS (NAME)
Users in Munich:
Users in St. Petersburg:
SQL: INSERT INTO CITIES (NAME) VALUES ('St. Petersburg'),('Munich')
SQL: INSERT INTO USERS (NAME, CITY, AGE) VALUES ('a',1,5),('b',1,27),('c',2,42)
SQL: SELECT USERS.ID, USERS.NAME, USERS.CITY, USERS.AGE FROM USERS WHERE USERS.AGE >= 18
Adults: b, c
In geospatial-messenger, I am currently forced to use db.transaction { }
(see MessageRepository).
It would be nice if Exposed could make it possible to support existing transaction management system like the one provided by Spring (see this documentation and DataSourceTransactionManager Javadoc).
Exposed could maybe allow to set the default db to use at Table
level, delegate the transaction management to any kind of other mechanism and allow to perform queries with Table.foo()
functions without a wrapping them into a db.transaction{ }
block.
My goal is to be able, potentially with some extensions, to be able to annotate service functions with @Transactional
and just rely on our regular JDBC based transaction management (more details here).
We did not found any functionality for making full text search queries or configurating.
Also it would be useful to make simple string queries via dsl objects.
Do you have any ideas or workarounds?
We use Postgres.
Hi,
we are trying to make Exposed work with Postgresql... looks like the select and insert queries work, but the creat methods fail due to "show tables" commnad that is not supported...
Postgresql needs some other command for finding the existing tables...
can you please help, Thanks.
ok, fixef it, don't know if it's right but:
fun Table.exists (): Boolean {
val tableName = this.tableName
var sql = "show tables"
var resultSet:java.sql.ResultSet? = null
if (Session.get().vendor == DatabaseVendor.PostgreSQL) {
sql = "SELECT tablename FROM pg_catalog.pg_tables"
}
resultSet = Session.get().connection.createStatement()?.executeQuery(sql)
if (resultSet != null) {
while (resultSet!!.next()) {
val existingTableName = resultSet!!.getString(1)
if (existingTableName?.equalsIgnoreCase(tableName) ?: false) {
return true
}
}
}
return false
}
There does not seem to be a way of getting the record id of the last inserted record(s).
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?
Or schema management gets annoying
I need some demo about it
Maybe I'm doing an odd thing, but this was a very confusing bug that Exposed seems to be vulnerable to. I'm writing a web server. On each request I call connect on org.jetbrains.exposed.sql.Database. That creates a new ThreadLocalTransactionManager and assigns it to TransactionManager.manager. This means that if I have 2 calls come in at the same time, the first gets a ThreadLocalTransactionManager with a ThreadLocal pointing to its Transaction. The second comes in and gets a second ThreadLocalTransactionManager with a ThreadLocal pointing at its Transaction. However when the first thread goes to find its Transaction it looks at TransactionManager.manager (which is the second ThreadLocalTransactionManager) and asks for the ThreadLocal value for its Transaction. However that's the wrong ThreadLocal, it really needs the one from the first ThreadLocalTransactionManager. So it gets null and Exposed thinks that thread has no transaction in progress which is wrong.
Although I can call Database.connect less often, I would expect your code would be better if the ThreadLocal inside ThreadLocalTransactionManager were inside a companion object. I've tried that and it solves my problem.
Using https://github.com/alaisi/postgres-async-driver, it could be nice to provide Reactive SQL support, or at least make it possible to use Exposed to generate SQL that can be used as a String input parameter in postgres-async-driver
(maybe this is already possible).
Any thoughts?
I think Exposed should not carry this dependency since the implementation to use is specific to each project, so it would be better to modify it to testCompile
.
From the Readme:
class User(id: EntityID<Int>) : IntEntity(id) {
companion object : IntEntityClass<User>(Users)
var name by Users.name
var city by City referencedOn Users.city
var age by Users.age
}
I have to repeat myself too much. I would like to be able to write:
class User(id: EntityID<Int>) : IntEntity<User>(id) {
companion object Users
var name by Users.name
}
I'm currently learning Kotlin and I understand the limitation that we can't use generic companion objects (meaning we have to rework the way the per-transaction caching works), so I'm curious if others more savvy might have ideas for how we could accomplish this. This is a pretty big refactor that I'm thinking of taking on but I was wondering if folks here might be receptive to it?
The creator of Joda Time also maintains a backport of JSR-310 called ThreeTen.
It seems the API forces the IdTable derived objects have got only one key column. Is there any equivalent to the JPA's EmbeddedId and IdClass annotations?
Whenever I try to check if a table exists using SchemaUtils.create(MyTable)
which thus calls table.exists()
. An exception is thrown with this message "Table name pattern can not be NULL or empty."
I'm using mysql-connector-java 6.0.3 and Exposed 0.5.0.
By read-only I mean columns that generated/updated by database( for example ON UPDATE
for mysql, or generated column, or modified by trigger). Such columns should not be used in update
queries.
How about such syntax:
object ConfigTable : IntIdTable() {
val key = varchar("name", 255)
val value = varchar("value", 255)
val created = readonly(datetime("created"))
val modified = readonly(timestamp("modified"))
}
And for entities all fields that referenced by readonly
table-fields can only be val
:
class ConfigEntity(id: EntityID<Int>) : IntEntity(id) {
var key by ConfigTable.key
var value by ConfigTable.value
// OK
val created by ConfigTable.created
// Compile-time error
var modified by ConfigTable.modified
companion object : IntEntityClass<ConfigEntity>(ConfigTable)
}
supportsExpressionsAsDefault
should be true
for Mysql
This looks a lot like JOOQ, probably not as production ready though, I was wondering what is the license?
The README.md suggests
Database.connect(...)
transaction {
create(table)
}
But create()
is not available in Transaction
.
Please update the README.md.
At least MySQL does not allow, which leads to a runtime error and negates type-safety.
With Mysql 5.7 last part of createMissingTablesAndColumns()
fails with this error:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'information_schema.s.NON_UNIQUE' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2545)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2503)
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1369)
at org.jetbrains.exposed.sql.vendors.MysqlDialect.existingIndices(Mysql.kt:87)
at org.jetbrains.exposed.sql.QueriesKt.checkExcessiveIndices(Queries.kt:114)
at org.jetbrains.exposed.sql.QueriesKt.checkMappingConsistence(Queries.kt:90)
at org.jetbrains.exposed.sql.SchemaUtils$createMissingTablesAndColumns$$inlined$with$lambda$1.invoke(SchemaUtils.kt:130)
at org.jetbrains.exposed.sql.SchemaUtils$createMissingTablesAndColumns$$inlined$with$lambda$1.invoke(SchemaUtils.kt:8)
at org.jetbrains.exposed.sql.SchemaUtils.withDataBaseLock(SchemaUtils.kt:149)
at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns(SchemaUtils.kt:108)
this is because by default 5.7 ships with sql_mode=only_full_group_by
The following code
EventField.deleteWhere({ EventField.id.inList(fieldIdList) }) // fieldList is a List<Int>
causes the following error with PostgreSQL:
Can't infer the SQL type to use for an instance of java.util.ArrayList. Use setObject() with an explicit Types value to specify the type to use.
If I comment out the following code, it works fine.
Op.kt:74, InListOrNotInListOp.toSQL
DatabaseVendor.PostgreSQL -> {
queryBuilder.registerArgument(list, expr.columnType)
}
Please add support for ORDER BY clauses. If there already is support and I'm not seeing it, please add an example of how to add an ORDER BY clause to a Entity.find query. Thanks.
Using Exposed
in other projects requires to add log4j to runtime, this is uncomfortable when you use another logging tool. Slf4j is de-facto logging facade especially for libraries.
Log4j can be moved to test scope.
When executing multiple inserts for the same table and setting up references between those new entities, the entity cache will fail to flush with java.lang.AssertionError: Entity must be inserted
(full stack trace in annexed files).
This can be avoided by flushing the cache explicitly in-between inserts, and doesn't happens with a debbugger atached (inspecting probably triggers cache flushing). My guess is that BatchInsertStatement
is trying to build a statement of the form INSERT INTO table (v) VALUES (v1), (v2), ...
, which won't work in this case because the ID of the parent entity is still unknown.
Bellow are an complete test case for reproduction and the test reports from my executions:
insert-flush-example.zip
reports.zip
Found some non-obvious behavior: when creating Entity
by EntityClass.new
with all fields population, then accessing any prop at first time leads to querying this entity from DB. This last query was unexpected for me if I populate all props upon creation.
Internally this is because upon save Entity._readValues
backing field is null and written doesn't cached in it.
I think Entity
should cache inserted values and return them without additional queries...or maybe I've missed something and this behavior considered as normal?
The syntax with all the it[xxx] calls seems a uglier than before the fork (and the current readme which shows different syntax)
The other choice is to have an object representing schema, but a class to represent state so that you can have an instance of that class available during insert, update, etc. I think the kotlin-nosql went that route.
Without state classes, this is similar to JDBC where you are always having to copy things OUT of something to put into state and pass around. It is more similar to ResulSet now than it was when it started...
My project was developed with eclipse, and want to use kotlin and exposed to handle the work of DAL, but after some try, I found this project is not working in my project,.following part got compiled issue, which the "forEach" and "it" is not found
(Users join Cities).slice(Users.name, Cities.name). select {(Users.id.eq("andrey") or Users.name.eq("Sergey")) and Users.id.eq("sergey") and Users.cityId.eq(Cities.id)}.forEach { println("${it[Users.name]} lives in ${it[Cities.name]}") }
How can I get any documents for this project?
I want to use kotlin in my project to take the role of DAO layer, and want to use this project, but actually I don't know how can I install this project, should I copy all the src into my project or there is any way to add them by maven ?
Exposed's latest tag is 0.6.6 in GitHub, but 0.6.5 in jcenter;
And I can not use jcenter download Exposed directly, I have to do this:
repositories {
mavenCentral()
maven { url "https://dl.bintray.com/kotlin/exposed" } // for kotlin exposed only not jcenter() here.
}
Gradle 2.14.1
Certain model structures cause SchemaUtils.create
and many other operations to fail with java.lang.IllegalStateException: Cycle references detected, can't sort table references!
.
This seems to triggered by tables with self-references, but it only when the table has other references as well. On the attached example, removing either reference from Posts
cause creation to succeed. The Post table should be perfectly valid as is.
Minimal example for bug reproduction:
cycle-example.zip
As demonstrated in the geospatial-messenger application, data classes + repository based DAO are really nice to use, I think Exposed could help to use this pattern with proper documentation and maybe provide some helpers (mapper/unmapper).
See Database.kt and MessageRepsitory for more details.
varchar("id", 10).primaryKey().comment("Identifier")
Our team very like your project, and we think that this ORM is the most laconic and simple for java (kotlin).
We use it with CodeFirst approach and would be nice to have opportunity to add db comments via mappings.
Thank you for your GREAT work!
We use GUID Id's generated by the application, but cannot use DAO because of this, without making it another value. Some databases also support auto generated GUID's on the server-side. Neither can work with IdTable as it is now. Therefore cannot use DAO's
issue is only in 0.7.0, 0.6.8 is fine with it
Entity.kt 430
for ((entry, genValues) in toFlush.zip(ids)) {
// genvalues are empty, null pointer Exception
val id = genValues[table.id]!!
// rewrites always by generateg value
entry.id._value = (table.id.columnType as EntityIDColumnType<*>).idColumn.columnType.valueFromDB(when (id) {
is EntityID<*> -> id._value!!
else -> id
})
Thank you!
Does not match current syntax
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.