I’m migrating my application from Cuba 6.10.14 to Cuba 7.1.2 and I’ve been facing some problems with lookupField component and how to make a query with its value.
In the old version, I had a groupDataSource like this:
<groupDatasource id="estadoDs" class=".....IcEstado">
<query><![CDATA[select e from bo$IcEstado e ]]></query>
</groupDatasource>
It’s not quite clear for me, because you’ve stripped all essential details from your query and exception stacktrace. Exception message mentions “component_estadoField”, but this component is not mentioned in code snippets.
But I can guess that you are passing component value which is entity and compare it with entity ID (Long) in a query.
E.g. :
select u from sec$User u where u.group.id = :component_group
You can try to remove “.id” and modify the query to:
select u from sec$User u where u.group = :component_group
Yes, sorry for the mistake. In the same screen with we have another lookupField and we have the same problem. I’ve copied the wrong log. The component name is “component_canalField”.
We tried with your solution and it doesn’t work. It seems that in the older version, the lookupComponent value was the ID, but when we’ve changed to the latest version, the component doesn’t work in the same way. Could it be possible? Because we are getting the entity.
Could you prepare a small demo project with a couple of entities and screens where the problem is reproduced? In this case we will be able to precisely advise what changes should be made.