JPAContainer + Nested Item

Hi everyone,

I hope anyone can give me a suggestion on how to use JPAContainer in order to implement some kind of “professional” form, I mean some real world form, becouse what I found around are just, let me say,
hello world
examples. I’m thinking about to use the JPAContainer addon in production, thereby acquiring appropriate licenses but I must admit that the preliminary tests are not very encouraging. My problem is that I can’t really get to work nested objects. My case is something like this:


Nation
→ contains
Region
→ contains
District
.

Very simple manyToOne associations. Beside these entities, I’ve another object called “CompanyOffices” where of course I need to specify a "
District
".

So, I simply obtained the java entity classes from the database table and think that with JPAContainer a simple CRUD application would be nicely accomplished. But later I found that is not really that way. The problem occurs when I try to commit a new CompanyOffice object (the loading from the database seems to work fine, in fact I use a table where its container has a
BatchableLocalEntityProvider<CompanyOffice.class>
). The
CompanyOfficeForm
has a set of basic TextFields properties (name, addreess, phone, etc) and a combobox used to select the district (for this I use a separate district’s entity provider).

When I try to commit the changes on the CompanyOffice object I always get this kind of exception:

Now my question is: where I can find some good “JPACntainer - CRUD - Application” example? or anyone can help me to figure out this simple problem?. Thanks, in advance.