Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Odata V4 String[] mapping

0 Likes
939

Good day

I am wondering if anyone has experienced any issues with mapping a String[] Data type
I am currently using PostgreSQL with Odata V4 Olingo and JPA and Hibernate
This is what entity looks like an how I have done the mapping:

@Entity
@Table(name = "ide")
@TypeDefs({
@TypeDef(name = "string-array",
typeClass = StringArrayType.class
)
})
@Type(type = "string-array")
@Column(name = "RN", columnDefinition = "text[]")
private String[] rn;


this is the response that I get:


{"error": {"code": null,"message": "com.sap.olingo.jpa.metadata.core.edm.mapper.exception.ODataJPAModelException: Type '[Ljava.lang.String;' of attribute 'rn' is not supported. Mapping not possible. If '[Ljava.lang.String;' is an enumeration, check if related package is provided."}}

1 REPLY 1
Read only

AlexGourdet
Product and Topic Expert
Product and Topic Expert
0 Likes
776

Thank you for visiting SAP Community to get answers to your questions.

As you're looking to get most out of your community membership, please consider include a profile picture to increase user engagement & additional resources to your reference that can really benefit you:

I hope you find this advice useful, and we're happy to have you as part of SAP Community!

All the best,

Alex