How to use data objects with joins on aggregated BDM objects with custom JPQL requests ?

1
0
-1

Hi there,

I'm wondering if (how) it is possible to use specific data objects in the bdm and use JPQL custom requests with joins in order to retrieve composite / agregated data of other business objects through the standard Bonita bdm API?

This in order to retrieve main data from a core object with, for instance, joins and counts of aggregated sub-objects built within the DB layers to be directly displayed on forms.

The only result I can currently get is BonitaRuntimeException java.lang.IllegalArgumentException: Cannot create TypedQuery for query with more than one return using requested result type

Is this possible with the BDM or should specific Data services be implemented to do this (which would be quite a pity) ?

Many thanks for any help provided.

Cheers,

Roland

1 answer

1
0
-1

I believe this is not possible due to the restrictions of JPA as implemented by Bonita.

The only thing I can suggest is adding your comments to mine already on the Ideas page and maybe something will happen.

http://community.bonitasoft.com/ideas/change-organization-bdm-and-enhance-jpql

or add your own specific requirements and allow others to add their comments.

but from what I've seen of the next release, I doubt it...for example:

fix(BDM) Query return type guidance #378
Add a tooltip to alert that some of JPA queries format are not
supported.
fixes BS-15325

So rather than actually enhance the operation, they've just added a message to say you can't do certain things. But what those things are are a mystery. This is the text I found:

Only below return types are supported.\nIt is currently not possible to use multiple SELECT expressions like 'SELECT e.name,e.id FROM...'. which relates to a bug I added here:

https://bonita.atlassian.net/browse/BBPMC-381

Apologies it's not good news,

regards
Seán

PS: If this reply answers your question, please mark as resolved.

Notifications