Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stefangt44/object-relational-mapper
A simple ORM similar to Hibernate for generating MySQL-like queries, developed using annotations and aspects.
https://github.com/stefangt44/object-relational-mapper
annotations aspectj orm
Last synced: 18 days ago
JSON representation
A simple ORM similar to Hibernate for generating MySQL-like queries, developed using annotations and aspects.
- Host: GitHub
- URL: https://github.com/stefangt44/object-relational-mapper
- Owner: stefanGT44
- Created: 2020-09-01T17:47:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-06T11:47:32.000Z (over 4 years ago)
- Last Synced: 2024-11-25T03:21:41.593Z (3 months ago)
- Topics: annotations, aspectj, orm
- Language: Java
- Homepage:
- Size: 118 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ObjectRelationalMapper
## Overview
A simple ORM, influenced by Hibernate and the Django ORM, for generating MySQL-like queries, developed using annotations, aspects and the Java reflect package.## Details
Entities must have the @Table(), and attributes the @Column() annotation.
Before saving entities and adding elements to manyToMany relationships, aspectJ methods intercept the call and perform validation.
An entity must have strictly one @ID field.
@ManyToMany fields must be of type ArrayList\, and elements being added are checked for type compatibility (T).
#### Supported annotations:
* @Table(name)
* @Column(name, required, notNull)
* @Id
* @IntegerField
* @CharField(maxLength)
* @MappedSuperclass
* @ForeignKey
* @ManyToMany## Example
### Defined entities:
![Alt text](images/1.png?raw=true "")
![Alt text](images/2.png?raw=true "")
![Alt text](images/3.png?raw=true "")
![Alt text](images/b4.png?raw=true "")### Saving (inserting) entities:
![Alt text](images/5.png?raw=true "")### Console output:
![Alt text](images/b6.png?raw=true "")## Sidenote
This project was an assignment as part of the course - Advanced Java programming during the 7th semester at the Faculty of Computer Science in Belgrade.## Contributors
- Stefan Ginic -