The code generated by DOGEN can detect whether the tables for your object actually exist in the database. The code also contains methods to add and drop the tables in the database without resorting to command-line SQL tools. All you have to do is configure Enhydra so that it can actually connect to a running database and log in.
If you're seeing exceptions when you try some of the operations on this page, make sure that the dogenDemo.conf file is correct. Also, since Postgres requires a different set of SQL types than other databases, you'll need to edit dogenDemo/data/DogenDemoSchemaDECL.java and recompile before you can use this application with Postgres. Instructions for what you need to do are included in the source for that class.
dogenDemo/data/DogenDemoSchemaDECL.java
The database is currently unformatted. In other words, the tables for this application haven't been created yet. Click the button below to create the tables and set up some test data:
The database already has the table definitions. You should be able to see the current contents of the database farther down the page. Click the button below to wipe out the existing tables (don't worry, you can create them again easily):
In this application, there are two persistent classes: Teacher and Student. Each class inherits from Person, but the Person class is abstract. Since there are never any "leaf" instances of Person, the database only knows about the other two.
Here's the contents of the Teacher table:
And here's the Student table:
To add a new Student, fill in the fields above and then click this button: