The JPA Processor fills the gap between Olingo V4 and the database, by providing a mapping between JPA metadata and OData metadata, generating queries and supporting the entity manipulations.
Apache License 2.0
122
stars
76
forks
source link
Entity are not loading when application is freshly deployed #263
when we deploy the fresh application and try to fetch the Odata entity list it is giving blank list, please check the image
Then once again if we redeploy it it started working as expected.
.
So in first instance when we deploy application , we are receiving empty entity list after multiple redeployment it started working fine.
After debugging the code i believe there might be some issue in below logic of IntermediateEntityContainer java class on method
@Override
protected void lazyBuildEdmItem() throws ODataJPAModelException {
if (edmContainer == null) {
postProcessor.processEntityContainer(this);
edmContainer = new CsdlEntityContainer();
edmContainer.setName(getExternalName());
edmContainer.setEntitySets(buildEntitySets());
edmContainer.setFunctionImports(buildFunctionImports());
edmContainer.setActionImports(buildActionImports());
edmContainer.setAnnotations(edmAnnotations);
// TODO Singleton
} else if (edmContainer != null && edmContainer.getEntitySets().isEmpty()) {
edmContainer.setEntitySets(buildEntitySets());
}
}
I have added else if condition but still facing same issue, schema list are not getting loaded properly i believe
Hi,
So in first instance when we deploy application , we are receiving empty entity list after multiple redeployment it started working fine. After debugging the code i believe there might be some issue in below logic of IntermediateEntityContainer java class on method @Override protected void lazyBuildEdmItem() throws ODataJPAModelException { if (edmContainer == null) { postProcessor.processEntityContainer(this); edmContainer = new CsdlEntityContainer(); edmContainer.setName(getExternalName()); edmContainer.setEntitySets(buildEntitySets()); edmContainer.setFunctionImports(buildFunctionImports()); edmContainer.setActionImports(buildActionImports()); edmContainer.setAnnotations(edmAnnotations); // TODO Singleton } else if (edmContainer != null && edmContainer.getEntitySets().isEmpty()) { edmContainer.setEntitySets(buildEntitySets()); } } I have added else if condition but still facing same issue, schema list are not getting loaded properly i believe