DEM - An Almost Object-relational mapping tool.
This code should not used in production settings - this was a school side project.
If you are looking to use a realiable ORM use Doctrine.
Code
DemGenerator is the most important piece of code here. It mainly does three things:
- Parse metadata from entities.
- Use metadata to generate ORM basic classes: Repository, DatabaseManager, EntityManager
- User then call
$myEntityManager->persist(new BusinessObject());
and see changes on database.
A Note
EntityManager buildDependenciesTree
(https://github.com/Dainerx/DEM/blob/master/toGenerate/EM/EntityManager.php#L34) was a beautiful simple thing of recursion.