ODMs and ORMs

Use Mongoose, Spring Data MongoDB or Beanie with TeselaDB.

Use with TeselaDB the ODM or ORM you already have. Mongoose, Spring Data MongoDB and Beanie talk to the database through the official driver of their language, so you only change the connection string.

Requirements

Mongoose

JavaScript
await mongoose.connect(process.env.TESELADB_URI);

Spring Data MongoDB

In the application.properties of Spring Boot 4, with the cluster CA in an SSL bundle. In Spring Boot 3, the property for the string is spring.data.mongodb.uri and the CA goes in the JVM trust store, as in Java:

spring.mongodb.uri=${TESELADB_URI}
spring.ssl.bundle.pem.teseladb.truststore.certificate=file:./ca.pem
spring.mongodb.ssl.bundle=teseladb

Beanie

Python
client = AsyncMongoClient(os.environ["TESELADB_URI"])
await init_beanie(database=client.shop, document_models=[Order])

Check

An operation of your model, such as saving a document and reading it back, works as against MongoDB.

Common problems

  • An ODM that reads buildInfo sees version 9.0.4, which is the one TeselaDB announces.

See also