Null LoadContext using datamanager

I don’t know why this query doesn’t work. Return the loadContext null. I checked the documention and the sentences is correct. I use v7.2.14. My project is no legacy.

    public LoadContext<Cliente> loadCliente (UUID id) {
        loadContext = LoadContext.create(Cliente.class)
                        ("select c from extranet_Cliente c where = :id")
                        .setParameter("id", id))
        return loadContext;

The result debugging:

loadContext = null
loadContext = null
this = {SelectEmpresaServiceBean@12695}
id = {UUID@12696} “4a969a53-a2ac-d686-c1d6-6ca40de02898”
dataManager = {DataManagerBean@12700}
loadContext = null

Please, someone has a idea what is wrong?. Thanks

Firstly, I suggest changing the view in setView() method to _local, because, according to docs, _local view contains all local entity attributes while _minimal view contains the attributes which are included to the name of the entity instance and specified in the @NamePattern annotation. If the @NamePattern annotation is not specified at the entity, this view does not contain any attributes.

Your attribute that you trying to select from the entity may not be included into _minimal view. You should set up the view that includes the selected attribute.

If it does not help, please send us a small sample project along with a reproduction scenario that demonstrates the issue.


Thanks Natalia,

I don’t really know what the problem was. I had to recover an old commit because several services didn work correctly in the project, among them Datamanager. query.