ObjectDB ObjectDB

Unexpeted internal exception

#1

I have a Country entity that has a one-to-many relationship with the Cities entity,
When I create the Country records with their respective cities, I have no problems, but when I want to visualize the cities, it does not show them to me, due to the internal error that is created when it persists. This occurs since you change the List attributes to LIstProperty for the list of Cities attribute. Earlier with List and ArrayList I did not present this error and the relationship between entities worked correctly.
How can i fix this?

edit
delete
#2

Please post the precise error message and the full stack trace of the error.

It would be helpful to read the posting instructions to improve the effectiveness of your posts.

ObjectDB Support
edit
delete
#3

The application does not show any error, the persistence of the countries of the entity and that of the cities, are carried out correctly. The problem is when I want to visualize the cities, it does not show them, because in the listaCiudades field it does not show me the related objects, but it shows the error "Unexpected internal exception", as seen in the captured Objectdb Explorer panel. This happens when I use this attribute:
Private ListProperty <GS_TablaCiudades> listaCiudades= new SimpleListProperty <GS_TablaCiudades> (FXCollections.observableArrayList (new ArrayList <GS_TablaCiudades> ()));

but when I use this other attribute, the relationship works correctly and in the listaCiudades attribute it shows me the related objects.
Private List<GS_TablaCiudades> listaCiudades = new ArrayList <> ();

I sent you the capture of the correct relationship with the attribute List <>

edit
delete
#4

Can you post a sample database for review?

ObjectDB Support
edit
delete
#5

I sent you the Database with the error and the Database with the correct data.
and I also send you the views where the data is displayed by applying the attribute List <>

edit
delete
#6

Both databases in #5 above seem to be empty.

ObjectDB Support
edit
delete
#7

Sorry for the dismissal, these are checked

edit
delete
#8

Apparently there is a problem with the listaCiudades field in GS_TablaPaises

  @OneToMany(targetEntity = GS_TablaCiudades.class, mappedBy = "paises",
    cascade = CascadeType.ALL) private ListProperty<GS_TablaCiudades> listaCiudades =
      new SimpleListProperty<GS_TablaCiudades>(FXCollections.observableArrayList());

ListProperty is not a supported type. Use List instead (see this paragraph in the manual).


 
ObjectDB Support
edit
delete

Reply

To post on this website please sign in.