querydsl-sql : Joda time should be optional
See original GitHub issueI am using Java 8 so I don’t want Joda time in my classpath.
Indeed it messes with the imports: if I want to use a java.time.LocalDate
, I have to be careful not to import org.joda.time.LocalDate
.
Currently if I try to exclude Joda time from my classpath, I cannot initialize Querydsl because in JavaTypeMapping
, the CalendarType
is registered and it depends on Joda time.
Moreover:
- still in
JavaTypeMapping
, Joda time types are registered, - the
Configuration
class is final and referenceJavaTypeMapping
, so there is no way around.
In a first step, the modifications that needs to be done are:
- Refactor
AbstractDateTimeType
to remove the Joda time dependency, - In
JavaTypeMapping
, do the joda time initialization the same way java 8 types are registered, - Mark joda time as optional in the pom.xml 😃
If that is ok, I can do the change. However, it is a breaking change: libraries and projects depending on querydsl-sql and using joda time will have to explicitly add joda time in their pom.xml, gradle etc. So the version on which this development will be made has to be decided.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:17
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Why does Querydsl not translate java.time.* columns when in ...
I'm using Querydsl and have a column represented by a java.time.LocalDate . This works fine when running via the IDE but fails when...
Read more >Release History - Querydsl
joda -time:joda-time is now an optional dependency. If your application relies on joda-time:joda-time make sure to specify it as a direct dependency rather...
Read more >com.querydsl.sql.types.LocalDateTimeType.<init> java code ...
@Test public void jodaSet() throws SQLException { LocalDateTime value = LocalDateTime.now(); Timestamp ts = new Timestamp(value.toInstant(ZoneOffset.UTC).
Read more >com.mysema.querydsl : querydsl-sql : 3.6.9 - Maven Central ...
Querydsl - SQL support - SQL support for Querydsl. ... com.mysema.querydsl:querydsl-sql 3.6.9. content_copy. <?xml version="1.0" encoding="UTF-8"?> ...
Read more >Operations - ScalikeJDBC
All of them ( single , first , list and foreach ) will execute java.sql. ... You need to add the optional module...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Spring Boot will autoconfigure a formatter when joda-time is in classpath. The formatter wants a newer version of joda-time than querydsl. So to me, the joda-time dependency seems pretty useless in 2020 and it’s causing problems. I would greatly appreciate this fix!
p.s. Declaring joda-time as a dependency is a trivial fix. I wouldn’t worry about this as a breaking change.
Same here. Please take the joda-time out.