ODMs and ORMs
Mongoose, Spring Data MongoDB and Beanie work with TeselaDB.
Use with TeselaDB the ODM or ORM you already have. Mongoose, Spring Data MongoDB and Beanie connect to the database through the official driver of their language, so you only change the connection string.
Requirements
- The connection string from Connection string and options.
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=teseladbBeanie
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
buildInfosees version 9.0.4, which is the one TeselaDB announces.