Closed blxbrgld closed 2 years ago
Hello,
In fact the JPAEdmNameBuilder
is the foreseen way to override the default name creation. For a known reason in some parts some old code is in place. The JPAServiceDocumentFactory
does not take the name builder and therefor it is not forwarded and not used when the name of an entity type is created.
I will provide a fix for this.
I like o mention, that for my understanding hyphens are not allowed in entity names. See: https://docs.oasis-open.org/odata/odata-csdl-json/v4.01/odata-csdl-json-v4.01.html#sec_SimpleIdentifier. This will lead to trouble in case you use Olingo or the JPA Processor e.g. to retrieve data.
Hello,
a fix is part of version 0.3.10. If you still have a problem, reopne the issue.
Hello,
i'm trying to implement a mock OData server using the jpa-processor, in order to be able to write E2E tests for a flow involving an OData service. The real OData server is not under my control and defines some entities, properties etc. with names in kebab case, like the following:
I do not want to define the JPA entity attributes in kebab case, and even if i do, i cannot (for example) do the same thing for the entity itself (it's a class).
Is there a way to define the desired name(s) for these entities, properties, and leave everything else to the processor? I tried to register a custom
JPAEdmNameBuilder
in the servlet the way shown in the following code snippet but with no luck.Is the
JPAEdmNameBuilder
the way to go? If not, is there some other option?I understand that for a server under my control the whole thing would not be an issue, but still it would be nice to have a way to handle it.
Thank you.