Play Framework - "Invalid value" when using helpers.select
<p>When I try to submit a form in Play 2.4, I get the error "Invalid value". This is my code:
Form:</p>

<pre><code>@helper.select(
    field = form("category"),
    options = categories.map {c =&gt;
        c.name.toString -&gt; c.name
    },
    '_default -&gt; "Choose One"
)
</code></pre>

<p>Model that form is submitting to (has a one to one with category):</p>

<pre><code>@OneToOne
@Constraints.Required
@Column
public Category category;
</code></pre>

<p>Category model:</p>

<pre><code>@Entity
public class Category extends Model {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(nullable = false)
    public Long id;

    @Constraints.Required
    @Formats.NonEmpty
    @Column(nullable = false)
    public String name;

    @Constraints.Required
    @Formats.NonEmpty
    @Column(nullable = false)
    public String description;

    public Category(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public static Finder&lt;String, Category&gt; find = new Finder&lt;String,   Category&gt;(Category.class);

    public static List&lt;Category&gt; getCategories() {
        return find.all();
    }
}
</code></pre>

<p>The form loads the id and name of the categories, it's just when I submit, that the error happens. I think it may be because Play is not getting the Category with the id when it searches the OneToOne relationship? </p>