{"id":19416723,"url":"https://github.com/jackhallam/weightless-orm","last_synced_at":"2025-06-23T13:34:41.483Z","repository":{"id":53788411,"uuid":"320830643","full_name":"jackhallam/weightless-orm","owner":"jackhallam","description":"🛸 A lightweight database mapping library","archived":false,"fork":false,"pushed_at":"2023-08-26T15:25:55.000Z","size":339,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-24T13:44:31.525Z","etag":null,"topics":["database","java","java-orm","mongo","mongodb","orm"],"latest_commit_sha":null,"homepage":"https://weightlessorm.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackhallam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-12T12:54:49.000Z","updated_at":"2024-09-17T12:52:31.000Z","dependencies_parsed_at":"2025-04-24T13:48:45.742Z","dependency_job_id":null,"html_url":"https://github.com/jackhallam/weightless-orm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jackhallam/weightless-orm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackhallam%2Fweightless-orm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackhallam%2Fweightless-orm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackhallam%2Fweightless-orm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackhallam%2Fweightless-orm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackhallam","download_url":"https://codeload.github.com/jackhallam/weightless-orm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackhallam%2Fweightless-orm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261487284,"owners_count":23166058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","java","java-orm","mongo","mongodb","orm"],"created_at":"2024-11-10T13:04:22.372Z","updated_at":"2025-06-23T13:34:36.464Z","avatar_url":"https://github.com/jackhallam.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg width=\"600\" src=\"weightlesslogo.png\"\u003e\n\u003c/p\u003e\n\nWeightless is the lowest barrier-to-entry database mapping library for the JVM. Weightless currently supports [MongoDB](https://www.mongodb.com). Learn more at [weightlessorm.com](https://weightlessorm.com).\n\n[![Github Code](https://img.shields.io/github/languages/top/jackhallam/weightless-orm?logo=github\u0026logoColor=lightgrey)](https://github.com/jackhallam/weightless-orm)\n[![Maven Central](https://img.shields.io/maven-central/v/com.jackhallam/weightless-orm?label=maven\u0026logo=apache\u0026logoColor=lightgrey)](https://search.maven.org/artifact/com.jackhallam/weightless-orm/0.1.0-beta/jar)\n[![Travis CI Build Status](https://img.shields.io/travis/com/jackhallam/weightless-orm?logo=Travis-CI\u0026logoColor=lightgrey)](https://travis-ci.com/jackhallam/weightless-orm)\n[![Codacy Badge](https://img.shields.io/codacy/grade/87dafa74154349a0af3878b3435b0f98?logo=codacy\u0026logoColor=lightgrey)](https://app.codacy.com/gh/jackhallam/weightless-orm?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=jackhallam/weightless-orm\u0026utm_campaign=Badge_Grade)\n[![CodeFactor Code Quality](https://img.shields.io/codefactor/grade/github/jackhallam/weightless-orm?logo=codefactor\u0026logoColor=lightgrey)](https://www.codefactor.io/repository/github/jackhallam/weightless-orm)\n[![LGTM Code Quality](https://img.shields.io/lgtm/grade/java/github/jackhallam/weightless-orm?label=code%20quality\u0026logo=lgtm\u0026logoColor=lightgrey)](https://lgtm.com/projects/g/jackhallam/weightless-orm)\n[![codecov](https://img.shields.io/codecov/c/gh/jackhallam/weightless-orm?logo=codecov\u0026logoColor=lightgrey\u0026token=LP3NP6IVS6)](https://codecov.io/gh/jackhallam/weightless-orm)\n[![Gitter](https://img.shields.io/gitter/room/jackhallam/weightless-orm?color=%234fb999\u0026logo=gitter\u0026logoColor=lightgrey)](https://gitter.im/weightless-orm/weightless-orm)\n\n## Getting Started\nSuppose we have a `Person` object we want to store in a Mongo database.\n```java\nclass Person {\n  String name;\n  int age;\n}\n```\nWith the Weightless library, the next class we will create is a `PersonAccess` interface. Note the method level and parameter level annotations.\n```java\ninterface PersonAccess {\n  @Create\n  void create(Person person);\n  \n  @Find\n  Person findByName(@Field(\"name\") @Equals String name);\n}\n```\nWait! We never have to implement this interface! Weightless has enough information to implement this class for us at runtime.\n```java\nWeightless weightless = Weightless.mongo(\"mongodb://localhost:27017\").database(\"mydatabase\").build(); // Connect to a local MongoDB instance\nPersonAccess personAccess = weightless.get(PersonAccess.class); // PersonAccess is implemented for us here\n\nPerson james = new Person(\"James\", 30);\npersonAccess.create(james);\n\npersonAccess.findByName(\"James\"); // { \"name\": \"James\", \"age\": 30 }\n```\n\n## Installation\nInstall with [maven](https://search.maven.org/artifact/com.jackhallam/weightless-orm/0.1.0-beta/jar):\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.jackhallam\u003c/groupId\u003e\n  \u003cartifactId\u003eweightless-orm\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.1-beta\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Is Weightless for Me?\nIs Weightless a good fit for your project? Weightless is designed to help projects get connected to a database as quickly as possible. Weightless is highly opinionated; it gives developers fewer customization options, and in return it is extremely easy to use.\n\nThat being said, Weightless does not lock you in. Off-boarding when your project is mature enough to need a highly customized solution is very simple. You can still use the same database, and you can move one database table or collection away from Weightless' control at a time as needed.\n\n## Going Further\nVisit [weightlessorm.com](https://weightlessorm.com) for a more information with live examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackhallam%2Fweightless-orm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackhallam%2Fweightless-orm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackhallam%2Fweightless-orm/lists"}