I then use a DAO to insert and retreive data. The insert seems to work since I do get back an id of the row inserterted into the PILOT table. But once I try to retrieve the inserted row I get the follwing error:
java.lang.Exception: PILOT is not mapped [from PILOT where id = :id]
It's like the tables are not created.
Can anybody help me?
Thanks. [ February 06, 2007: Message edited by: Henrik Engert ]
Query q = getSession().createQuery("from Pilot where id = :id");
Changed from PILOT to Pilot.....
BUT, why does the data not persist in the database when I restart the application? If you start the app again with a SELECT (Query q = getSession().createQuery("from Pilot where id = :id") then the data is not there?!
You are losing the database data because you are using Hypersonic and using it as an in-memory database, so as soon as you close it, the data goes bye-bye. Try using MySql as a database. Hypersonic is good for testing your app, but not really used for production, when you really want your data to be saved for the long haul.
Don't get me wrong Gregg, I use Hypersonic a lot for development, that is what I really meant when I said testing, I included development in my term, because I was using the term broadly and not the IT specific term.