/*
 * Author: Jean-Michel RICHER
 * Affiliation: University of Angers, France
 * Email: jean-michel.richer@univ-angers.fr
 * Date: July 2010
 * Project name: ORM PHP MG (Model Generator)
 */
 
This package is an example of what can be accomplished doing reverse engineering
on a MySQL database in order to perform DAO (Data Access Object) with ORM (Object
Relational Mapping) "a la" Hibernate.

The structure of the package follows the M(P)VC paradigm : Model (Persistence) View 
Controller, although View and Controller are not used here.

===========================================================
HOW TO PROCEED ?
===========================================================

1) SETUP DATABASE 
-------------------------------

In order to obtain the model and persistence classes, first create a MySQL database
called "commands" that can be accessed by "commuser" with "commpass" password, or
modify the persistence/database_connection.php file.

$ mysql -u root -p
mysql> create database commands;
mysql> grant all privileges on commands.* to 'commuser'@'localhost' identified by 'commpass';
mysql> flush privileges;
mysql> quit;

Then create the database tables by running ant (remember to use MySQL root password):

$ ant fill_database

2) GENERATE CLASSES
-------------------------------

run ant

$ ant clean
$ ant generate_orm


2) TEST CLASSES
-------------------------------

run ant

$ ant execute




