Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有A and B(a_id:Long)实体。
A and B(a_id:Long)
B取决于A。所以我已经设置了constrainReference(onDelete cascade)。一切正常。
B
A
constrainReference(onDelete cascade)
但是当我删除时,A我想根据B. 可以以某种方式拦截B'sonDelete()并使用 Squeryl 方式执行操作,还是我必须手动执行?
onDelete()
在您的架构中尝试:
override def callbacks = Seq( afterDelete(table) call (record => logger.debug("afterDelete")))