Consider the following:
User.findAll(By(User.device_token, token))
.foreach(_.device_token(Empty).save)
device_token is a MappedString. One would guess that it cleared the
field (either set it to null or the empty string). In fact this bit
of code does nothing at all.
-harryh
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
It compiles due to this (in MappedString):
> Hmmmm.... it shouldn't compile (please file a bug).
def apply(ov: Box[String]): T = {
ov.foreach(v => this.set(v))
fieldOwner
}
Anyways, will file a bug.
That, on the other hand, does not compile. Though _.device_token(null:
> Mapper null is actually null... so _.device_token(null).save
String).save does. As does the, ugly, _.device_token(Full(null)).
-harryh
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.