Hi there, I’m upgrading from 2.4.4 to 2.6.21 and have an issue with my projects DB connections to MSSQL DBs
Previously I just extracted datasource from DB class and fed it to the java.sql for handling, with update 2.5 it became different and example says I should create a class for each DB (is there a way to create new connections without creating a class that injects it?..). I want to execute simple queries that have no model binding to DB and their task is to extract simple data sets from many large DBs. What’s the best way to approach it?
How to receive db connection in controller? Seems it shouldn’t done anymore? should I move all DB interaction into new DB class and inject it into controller? What if I need to access DB not from controller? Play doesn’t inject classes natively to classes that are not controllers (in my experience, and I’ve been used deprecated Play.application().injector().instanceOf(Configuration.class))
Is there a way to access simple data structure from a view? Previously I used static access to DB to query simple values into temple. It’s not clean ye, but worked as I’ve a LOT of those and passing them via controller would require so much parameters. Is there no other way?
So many questions, so little documentation =(