Reputation: 31576
I generated source code using the method described here
https://github.com/slick/slick-codegen-example/blob/master/build.sbt
This method works and now when I do compile
I can see that the auto-generated Target.scala file is being successfully compiled as Tables.class
but in my source code, If I try to import the autogenerated class file. it says cannot resolve symbol demo
Upvotes: 1
Views: 244
Reputation: 450
You can also generate source file with the code below (example for MySql) :
slick.codegen.SourceCodeGenerator.main(
Array("slick.jdbc.MySQLProfile", "com.mysql.jdbc.Driver", "jdbc:mysql://localhost:33000/MyDB?useSSL=false&autoReconnect=true",
"ABSOLUTE_PATH_FOR_FILE", "com.mypackage", "USER","PASS"))
Upvotes: 0
Reputation: 14227
This is caused by IntelliJ
can't recognize the generated code, you can try to mark target/scala-2.11/src_managed/slick/
this as Sources Root. like:
Upvotes: 3