cancel
Showing results for 
Search instead for 
Did you mean: 

usage of Java-backed NoSQL Database with Olingo OData service?

former_member530686
Discoverer
0 Kudos

Dear Mr. lpradel & SAP Community,

I have a requirement to map business data entities (collections in MongoDB, a NoSQL database) to OData entities (Apache Olingo OData since we use Java-backend with Spring Boot) and expose the OData endpoint contains business data which can be consumed by Fiori UI.

I saw tutorial series from https://blogs.sap.com/author/lpradel/ , which matches more-or-less with my requirements. Here I want to know that can we map business entities (e.g. collection in MongoDB i.e. a NoSQL Database instead of tables in a relational DBMS) to OData entities in this scenario (i.e. Java Back-end) ?

Best Regards, Mahdi

Accepted Solutions (0)

Answers (1)

Answers (1)

richard-zhao
Employee
Employee
0 Kudos

Hello, Mahdi. So far as I know you can map business entity to OData entity by customizing a converter. You Know the data from MongoDB are kinds of XML, JSON or Strings Let's say they actually are kind of String. You can get those Strings base on your business logic and add to OData Entity. What I am trying to say is you can customize your OData Entity base on your requirements.

final Entity e1 = new Entity()
          .addProperty(new Property(null, "ID", ValueType.PRIMITIVE, 1))
          .addProperty(new Property(null, "Name", ValueType.PRIMITIVE, "Notebook Basic 15"))
          .addProperty(new Property(null, "Description", ValueType.PRIMITIVE,
              "Notebook Basic, 1.7GHz - 15 XGA - 1024MB DDR2 SDRAM - 40GB"));
      e1.setId(createId("Products", 1));
      productList.add(e1);