MongoDB • MongoTemplate • Implementación automática de Repository(DAO) • DSL basado en Java para Query, Criteria y Update • Soporte a persistencia mixta(Cross-store persistance) • Integración con GeoSpatial de Mongo • Integración con Map Reduce de Mongo • Administración y monitorización por JMX
cada tipo de documento en distintas colecciones • Referenciar vs Duplicar • Consistencia • Consultas extras • Inconsistencia • Documento autodescriptivo
upsert, es decir, si no existe lo crea • Existen muchos “update modifiers” : $inc, $set, $unset, $push, $pushAll, $addToSet, $pop, $pull, $pullAll, $rename, $bit
* FROM users WHERE age=33 db.users.find({age:33}) SELECT * FROM users WHERE age=33 ORDER BY name db.users.find({age:33}).sort({name:1}) SELECT * FROM users WHERE age=33 ORDER BY name LIMIT=10 OFFSET=0 db.users.find({age:33}).sort({name:1}).limit(10).skip(0)
SELECT * FROM users WHERE name LIKE "Joe%" db.users.find({name:/^Joe/}) SELECT * FROM users WHERE a=1 or b=2 db.users.find({$or:[{a:1} ,{b:2}]}) SELECT COUNT(*) FROM users db.users.count()
Deletes the entity with the given id. delete(Iterable<? extends T> entities) Deletes the given entities. delete(T entity) Deletes a given entity. deleteAll() Deletes all entities managed by the repository. exists(ID id) Returns whether an entity with the given id exists. findAll() Returns all instances of the type. findOne(ID id) Retrives an entity by its primary key. save(Iterable<? extends T> entities) Saves all given entities. save(T entity) Saves a given entity. findAll(Pageable pageable) Returns a Page of entities meeting the paging restriction provided in the Pageable object. findAll(Sort sort) Returns all entities sorted by the given options.
...) • Insertar tweet indicando que es un retweet haciendo referencia al tweet original • Modificar el tweet original para llevar una cuenta de retweets