Invalidate cached object in MongoRefField upon setting the value
Currently, when you set a new value in a MongoRefField, the object cache does not get refreshed and contains the previous value.
Proposed solution is to override setBox:
override def setBox(in: Box[MyType]): Box[MyType] = {
_calcedObj = false
super.setBox(in)
}
Note: super.setBox is synchronized and the above should be as well.
Proposed solution is to override setBox:
override def setBox(in: Box[MyType]): Box[MyType] = {
_calcedObj = false
super.setBox(in)
}
Note: super.setBox is synchronized and the above should be as well.
Leave a comment