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,
- How do I setup Model class in play framework to access the database tables and its fields?
- 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..
There's plenty of documentation and tutorials on the subject.
MySQL works out of the box with JPA.
For morphia and MongoDB you might want to use a module.
http://www.playframework.com/documentation/1.2.7/jpa
http://www.playframework.com/documentation/1.2.7/guide2
http://mangstacular.blogspot.com/2011/09/play-framework-part-2-database.html
http://www.playframework.com/modules/morphia
http://www.playframework.com/modules/morphia