jpdsousa / mongo-obj-framework Goto Github PK
View Code? Open in Web Editor NEW:point_right:Smof:point_left: The Ultimate Java ORM for MongoDB
License: MIT License
:point_right:Smof:point_left: The Ultimate Java ORM for MongoDB
License: MIT License
Hey Hacktoberfester, if you came across this issue and you like MongoDB (and java), you've just found an awesome project to contribute to!
If you're not so much into databases and ORMs but you would like to contribute to other projects of mine: search my other Hacktoberfest issues
This is actually a simple issue, easily achievable. Just go to the version eye page (or click the version eye badge in the README file), where dependency versions are managed, see which dependencies are outdated and update the pom.xml file with the newest versions.
Note that some dependencies are muted, as they most likely require additional code updates. Feel free to try to update them as well!
The query API is, at this point, quite simple (only allows match filtering). Thus it needs to support additional MongoDB features.
GridFS refs are not being correctly lazy loaded. As a matter fact, grid refs should not be lazy loaded at all, as they represent explicit references, and can be safely loaded as such.
Partial indexes allow users to filter documents that are added to the index.
NULL
values to be indexed, since MongoDB only allow one NULL
value in unique indexes (source).Use collection options to allow users to always append a storage time field.
Add the necessary methods to element interface.
Perhaps, add an additional feature to also store last modification's timestamp.
@JPDSousa hi!
What do you think of creating maven hierarchy for this project? It will help to handle resources/testResources automatically by maven. If yes, then I'm ready to change the structure, feel free to assign me to this issue ๐
Thanks a lot!
Rename test package name so that they match with dev package names.
Separate replace-related operations from update-related operations.
Start by creating different methods in Smof. Then, either use different interfaces or different classes to separate both functionalities.
At this point, SmofParser relies only in the native parsers provided by the project itself. Providing access to the Mongo Java Driver native Codecs (equivalent to Smof parsers) would be optimal for other features such as querying, updating, inserting, etc.
This will be solved by extending the native IntegerCodec from MongoDB Java driver, allowing it to parse to and from BsonStrings.
When the parser detects an Element, it casts its field to PrimaryField. However, when in an Array of Elements, the Element field is a Secondary field.
CollectionUtils is not being properly tested.
Upgrade update API with the current MongoDB update operators.
At this point, Smof has no mechanism to prevent users to map one type to multiple collections. This should not be allowed.
Allow users to attach byte arrays to SmofGrifRef, which are then queued to be uploaded to the database.
Support for gt
, gte
, lt
and lte
operators on dates.
Allow users to customize the insertion order between objects and 'sub-objects'. This allows for custom insertions:
The solution comes in two fold:
@SmofObject
that allow users to specify if the correspondent object is to be inserted before or after the main object. This is obviously recursive;upsert
option in collection options, that if set to false
restricts duplicate objects from being inserted twice (i.e. replace). Thus, the insert operation fails, leading to any trailing operations to fail as well (this does not guarantee atomic properties).SmofTypeContextImpl is iterating through a map to find the (super) TypeStructure of a given type. This presents a considerable performance issue.
Hey Hacktoberfester, if you came across this issue and you like MongoDB (and java), you've just found an awesome project to contribute to!
If you're not so much into databases and ORMs but you would like to contribute to other projects of mine: search my other Hacktoberfest issues
Smof is a growing project, with developers who often avoid some design aspects in order to develop and deploy faster (note to self). This issue is focused in fixing such abnormalities, improving the code quality.
This issue is mainly focused in simple design patterns that promote the project's scalability (codewise), such as:
<class_name>Impl
(e.g. class Collection
is renamed to CollectionImpl
, creating interface Collection
);package
. Make the constructor also package and create a create(...)
method in the new interface that calls the class constructor. In case multiple case multiple classes implement the interface use the factory pattern (next point);<interface_name>Factory
that provides methods to create instances from each of the classes;getDefault()
).Smof has a medium-sized code base at this point, which might lead to an additional effort to find valid code smells (i.e. code that can be improved through the points mentioned above). Feel free to comment in this issue regarding any doubts and suggestions.
โ๏ธ If you detect a situation that might fit into the above points, discuss it here to make sure that it is actually an issue and not a functional requirement. โ๏ธ
Consider two Elements:
A is inserted: how is B serialized?
Expected behaviour: B is serialized as a common object.
Make CollectionUtils factory, where users can design and register their own custom factories.
Provide methods in the Smof pojo to fetch SmofCollections by class.
Hey Hacktoberfester, if you came across this issue and you like MongoDB (and java), you've just found an awesome project to contribute to!
If you're not so much into this databases but you would like to contribute to other projects of mine: search my other Hacktoberfest issues
Contribute to Smof by writting documentation to the project.
Hey Hacktoberfester, if you came across this issue and you like MongoDB (and java), you've just found an awesome project to contribute to!
If you're not so much into databases and ORMs but you would like to contribute to other projects of mine: search my other Hacktoberfest issues
Test coverage is really useful in any kind of software project. Smof greatly appreciates test coverage contributions.
Smof uses Maven to run tests. So, in order to run existing tests and create your own:
mongod --port 20720
mvn clean verify
in the projects root folder (i.e. mongo-obj-framework) by default, and wait for the green text stating that everything went fine;src/test/java
and increase the test coverage!
Test
, such as ExampleTest.java
, as Maven Surefire plugin will only run classes with that pattern;{project.root}/target/site/jacoco
(open the index.html for a sort-of-pretty report).Smof is in active development, and has not been properly tested, which may lead to some occasional bugs or questions. Feel free to create an issue if you stumble upon any bug or comment bellow if you have any douts.
Add methods in a transaction-like fashion to SmofCollections to provide a way to manage bulk-write operations
Do not use ObjectId in AbstractElement.equals(), as the objectID is not a final field, which can lead to (re)hash problems.
SmofGridRef metadata is not loaded when the reference is loaded from the database.
Use bytebuddy to create lazyloading instances of registered classes.
Note: this is already implemented to interfaces.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.