Hello out there,
I have an urgent problem. In the past I used the Integer-Identity option when creating a new entity.
Now I choosed the Long-Identity in order to expect much more records and get the error
‘IllegalStateException: Entity ‘com.company.XXX.entity.Client [managed]’ is a ChangeTracker but has no PropertyChangeListener’
when saving a new object.
(The obvious difference concerning the entity is the baseclass BaseIdentityIdEntity instead of BaseIntIdentityIdEntity).
What’s the reason and how could I solve this.
It’s very important!
Could you please describe your problem in more detail? What CUBA version? How you changed base class (using studio or manually)? A demo project that reproduces the problem is highly appreciated and will sped up the detection of the problem.
Hi,
I have expressed myself in a misleading way: I changed the type not in an existing project, but created a new one. Unfortunately I can’t post the project (customer is a lawyer office and the prj. is confidential).
(using cuba 7.2.20)
But let’s describe the essentials of the story: I created a new project (with the common cuba-wizard) with
the intension to to take over as much as possible from an existing one (because its identical to high degree). To do it from scratch wasn’t an option becase of the timeline (>80 entities with >40 attr. each and a lot of functionality).
So the approach was successful as already tested (all screens, all the master data, support functions etc.).
The problem occurded on a couple of entities, which I need to change the ID type from INT to LONG.
Therefore I created the enitity with a Long Identity based on the cuba wizard (see screenshot), completed with the idea to copy all of the custom attributes from the source project (copy out of the cuba screen, paste in the screen).
The first msg was the one I posted in the initially (see above).
Pretty confused I tried the other way round with a new database with ID type Integer Identity on the cuba wizard (is INT in the DB), copy/paste the customer attr. resuming in the error msg
Meanwhile I’m pretty sure that the copy/paste action was the reason.
The remaining questions are, what happens when copying non-system attributes into the existing entity,
and is it possible to change the ID type of an entity?
I hope the is way to get out of that confusing situation (that took already way too much effort)…
(Sorry, I can’t send the zipped project, it’s client confidential)
The error msg (shwon obove; ‘valuesource…different types’) is now solved, but I still stuck on the first (inital error), occuring after the entity is stored (succesfully) on th DB
Got it: in the attributes of the affected entities there are GeoPoints/Locations; whats missing in the
copied ones is the annotation @Convert(converter = CubaPointWKTConverter.class)