This example seems to work:
http://javahowto.blogspot.com/2006/07/helloworld-with-jpa-toplink-and-mysql.html However, when I comment out the statements that create and delete the objects (as I have done below), I expect to see it display the same greetings and messages. Instead, no messages are being retrieved. Apparently something is recreating the database tables every time I run the program. What do change so I can run this program and see the data previously entered into the database?
Thanks,
Siegfried
HelloWorld.java:
Greeting.java:
Message.java: