Linking and querying MySql with Play-1.2.5

661 Views Asked by At

I am using MySql and Play-1.2.5, I have linked the two using the following lines in application.conf,

# If you need a full JDBC configuration use the following :
db.default.driver=com.mysql.jdbc.Driver
db.default.user="root"
db.default.password="pass"
db.default.url="mysql://localhost:3306/sample"

AFAIK, correct me if I am wrong, Play-1.2.5 does not provide any documentation for linking and querying database.

Now,

  1. How do I setup Model class in play framework to access the database tables and its fields?
  2. Is there a query interface(eg: MorphiaQuery for MongoDB) to perform CRUD operations on mysql database or using the actual mysql query is the only option?

Thanks in advance..

1

There are 1 best solutions below

0
On