users@glassfish.java.net

Re: how to generate EJB 3.0 entity beans from database views????

From: <glassfish_at_javadesktop.org>
Date: Wed, 20 Jun 2007 11:29:11 PDT

You may be able to generate them by hand, but a prime requirement for the generator (and I'm talking like the generator in NetBeans) is that the backing table has a primary key. Views don't have Primary Keys (at least when you ask the DB).

But if you create your own bean, and simply map it to the view, and annotate the PKs properly, it will probably work.
[Message sent by forum member 'whartung' (whartung)]

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