[scala] Scala models should work with Serializable objects