ComboBox with a JPAContainer


I have a ComboBox showing entities sourced from a JPAContainer. This ComboBox was built using a FieldGroup buildAndBind method and is bound to a BeanItem instance. Now when I change the value of the ComboBox, I get a$ConversionException: Unable to convert value of type java.lang.Long to model type class com.example.Supplier. No converter is set and the types are not compatible. I understand the concept of model values vs. presentation values: here the ComboBox triggers a ValueChangeEvent with the Long id value of the Supplier instance. But do I really need to implement a custom converter in this case? There must be a more straightforward way to say that I need the Supplier instance and not the container index.


Check SingleSelectConverter (!/thread/2729098

Anyone with a less boilerplate solution?