- Created a custom SessionFactory class that accepts DataSource and has a createSession method
- Created a custom Session class that accepts DataSource and has methods find(Class entityType, Object id) and close()
- Created custom annotations Table, Column
- Implemented method find using JDBC API
- Introduced session cache
- Store loaded entities to the map when it’s loaded
- Don’t call the DB if entity with given id is already loaded, return value from the map instead
- Introduced update mechanism
- Created another map that stores an entity snapshot copy (initial field values)
- On session close, compare entity with its copy and if at least one field has changed, perform UPDATE statement
-
Notifications
You must be signed in to change notification settings - Fork 0
Podolian/orm-session
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published