org.squeryl
For use with View[A] or Table[A], when A extends KeyedEntity[K], lookup and delete by key become implicitly available Example :
class Peanut(weight: Float) extends KeyedEntity[Long] val peanutJar = Table[Peanut]
Since Peanut extends KeyedEntity the delete(l:Long) method is available
def removePeanut(idOfThePeanut: Long) = peanutJar.delete(idOfThePeanut)
And lookup by id is also implicitly available :
peanutJar.lookup(idOfThePeanut)
For use with View[A] or Table[A], when A extends KeyedEntity[K], lookup and delete by key become implicitly available Example :
class Peanut(weight: Float) extends KeyedEntity[Long] val peanutJar = Table[Peanut]
Since Peanut extends KeyedEntity the delete(l:Long) method is available
def removePeanut(idOfThePeanut: Long) = peanutJar.delete(idOfThePeanut)
And lookup by id is also implicitly available :
peanutJar.lookup(idOfThePeanut)