I got an error message such as
java.lang.IllegalStateException: No dialect registered for informix-sqli. URL=jdbc:informix-sqli://192.168.1.100:7001/dt:informixserver=ifx
@Tapac
I did try the #441 resolved issue.
Database.registerDialect("mariadb") { MysqlDialect() }
Database.connect("jdbc:mariadb://localhost:3306/rankup",....)
mine version (revised)
val urlString = "jdbc:informix-sqli://localhost:9088/sysadmin:informixserver="
val ifxDevDb = Database.connect(urlString, "com.informix.jdbc.IfxDriver", user = "informix", password = "in4mix")
fun mapToDto(it: ResultRow) = PhGroupDto(/* column mapping */)
fun test(){
Database.registerDialect("informix-sqli") { MyDialect()
// misunderstanding ... not supported dialect for informix db
}
transaction (ifxDevDb) {
var result = PhGroup.selectAll().map{mapToDto(it)}
println(result);
}
}
That's strange. Do you provide driver parameter into Database.connect?
I misunderstanding the sample function about MysqlDialect().
The MysqlDialect() should be implemented by me.
But, I have no idea about how to implement. Could you please give a sample or reference document for me to study?
PS: I tried the org.hibernate.dialect.InformixDialect, but type mismatch with DatabaseDialect.
Database.registerDialect("informix-sqli") { InformixDialect() }
In a #441 issue was in unsupported MariaDB dialect while it's similar to MySQL. And the hack was to "tell" Exposed to use MysqlDialect when mariadb driver/connection is used.
In your case, you could try to register "informx-sqli" with any of the supported dialects and check how it will work or implement your own InformxDialect (take h2 as the example).
After reading h2 sample makes me understand the situation. I need a couple days to make a decision and thank you for the explanation.
In our project, Informix db stored many historical data. But, the SQL Server will be our main database. So, we decide to trans data from Informix to SQL Server by ETL tool for passing the dialect problem.
BTW, the "exposed" is a great orm project. Thank you very much.
Most helpful comment
In our project, Informix db stored many historical data. But, the SQL Server will be our main database. So, we decide to trans data from Informix to SQL Server by ETL tool for passing the dialect problem.
BTW, the "exposed" is a great orm project. Thank you very much.