EmbeddableEntity and Entity browser/editor screen

Hi CUBA team,

I’m having issues displaying entities that have an embedded property in the web application.

I have a class Name that is an EmbeddableEntity and a class Product that is a StandardEntity with Name as one of it’s properties.
When the browser screen is empty there are no issues, after creating a product, I get redirected to the browser screen and the created product is displayed in the list, however when navigating to the edit screen of the product i get the following exception:

IllegalStateException: Cannot get unfetched attribute [name] from detached object com.dn.playground.entity.Product-047e27af-33bb-80aa-19fe-edbe0ee69a5e [detached].

Refreshing the page and navigating to the product browser screen results in the same exception as above.

I have looked in the documentation and I fail to find a guide on how to use EmbeddedEntities. Any information on how to use it would be appreciated.

Thanks for the help.

Hi Benjamin,

How did you define a view which is used in the browser and editor screens?
It should contain the name attribute.


I resolved the issue since asking the question.

The issue I had was that Product inherited from a NamedEntity where the Name property was defined. When creating the view, the Name property was not added to the views.xml when creating it in cuba studio. Manualy adding Name to the views.xml resolved my issue.

Kind regards,