Does Kotlin, JPA and jpql assist work?

Answered

Hello,

I'm using Kotlin with JPA, and I can't get the jpql syntax highlighting and code assist to work when using the EntityManager.createQuery method.  JPA is setup correctly in my project, and when I reference createQuery("...") within a java file (in the same project) the highlighting of the jpql string works fine.  Is this just not supported for Kotlin files? Thanks.

Using: IDEA 16 EAP

5 comments
Comment actions Permalink
Official comment

Current status is (for IDEA 2018.2 and Kotlin 1.2.50) :

  • EntityManager.createQuery and other such methods works, but there are some issues with string concatenation KT-13233 
  • Spring JPA Repositories support is planned KT-19309 
  • Support for @Query annotation is also on the way KT-21749 

 

Comment actions Permalink

Yes, the default language injections that are supported for Java files are not yet enabled for Kotlin. We plan to add this functionality later this year.

0
Comment actions Permalink

What is the status of enabling SQL language injection for Kotlin files?

0
Comment actions Permalink

Has there been any progress on this? I'm not getting any syntax highlighting in Kotlin files, either (like Spring data Repository files, etc). You would figure that would have been pretty high on the priority list for the IntelliJ IDEA team since JetBrains created both of these products =\

0
Comment actions Permalink

Bump? Still not working, ex. no assist when using spring @Query in kotlin interface extending JpaRepository.

0

Please sign in to leave a comment.