有人成功地在Play Framework 2.0中使用Squeryl的externalTransactionManagementAdapter吗?
object Global extends GlobalSettings {
override def onStart(app: Application) {
SessionFactory.externalTransactionManagementAdapter = Some(() =>
Some(new Session(
DB.getDataSource().getConnection(),
dbAdapter)
)
)
}
我无法让Squeryl返回到连接池中。它确实可以使用
SessionFactory.concreteFactory
,但这意味着我必须使用事务块,而不是squeryl参与Play的事务管理。这个问题是我先前问题的更具体变体:如何将Scala Squeryl ORB与play 2.0框架集成?。
KeyedEntity
,可能会产生冲突。 - crockpotveggies