1

Postgres NoSQL capabilities have been for a long while. In Java world where Hibernate/JPA is mainstream for database access, how to use those JSON/JSOBN objects, and map them right?

For example I have several arrays of Integers (or Integer, String pairs) with size 100-200, that would fit nice to be put/saved as JSON as there is no need for identity of those elements. Or there is a Entity with byte[] fields.

Paul Verest
  • 60,022
  • 51
  • 208
  • 332
  • 2
    Don't confuse `json/jsonb` columns with NoSQL. – Kayaman Oct 17 '17 at 12:38
  • Is anything else from Postgre NoSQL that can be used via Hibernate? I'd like to experiment, but not going to give up the ORM. – Paul Verest Oct 17 '17 at 17:35
  • Perhaps you're talking about [OGM](http://hibernate.org/ogm/). – Kayaman Oct 17 '17 at 17:40
  • The interesting way that Postgre took, was adding NoSQL into RDMS. If using hibernate+OGM (or other, that is not standardized contrary to JPA for SQL), than it would be the same as using 2 datasources, that would be comparable to MySQL+MongoDB. The original idea was use newer features gradually, and stay within hibernate/JPA, that is good for classical cases. – Paul Verest Oct 17 '17 at 17:48
  • While their marketing team seems to have embraced the term "Postgres NoSQL", Postgre**s** is still a RDBMS. ORM stands for Object **Relational** Mapper. In the linked question you can find examples on how to work with `json/jsonb` columns, but there's no built-in functionality. – Kayaman Oct 17 '17 at 17:53

0 Answers0