persistence@glassfish.java.net

Composition, inheritance or queries: best practice

From: Greg Ederer <greg_at_ergonosis.com>
Date: Tue, 07 Nov 2006 08:54:16 -0800
Hi,

I am building a system that has various kinds of users.  All users have first and last names, a username and a password.  Customer users have a shopping cart and orders; vendor users have products and commissions, author users have articles; et cetera.  Any user can be more than one kind of user; e.g., an author can also be a customer and a vendor all at the same time.  What is the best way to architect this using JPA?

Thanks in advance for any suggestions.

Cheers,

Greg
--
| E R G O N O S I S
| Greg Ederer
| Lead Developer
| greg@ergonosis.com
| 360.379.1157
| 
| OpenDocument - OK
|