users@glassfish.java.net

Java Persistence API

From: <glassfish_at_javadesktop.org>
Date: Sun, 15 Feb 2009 10:19:36 PST

Hi,

I am developing a web app against glassfish v2ur2 and MySQL 5.0. I am going to use session and entities EJB3 classes. And I am having problems to understand the Java Persistence API. I mean:

#1.- Do I need an entity for any table in the DB?
#2.- On first time I am going to do only select queries, but exists a
        relationship type of many-to-many between tables in the DB I solved
        with normalization. How do I indicate this relationship in the code?
#3.- I do not use keyGen to generate the PKs. All of them are type of auto-increment.
        Is this problematic?

To have you an idea of what I am going to do, it is something like the Duke’s Bank.

Thanks in advance,
Jose Alvarez de Lara
[Message sent by forum member 'josealvarezdelara' (josealvarezdelara)]

http://forums.java.net/jive/thread.jspa?messageID=331980