"Much as some folks hate to lose their way, me, I pray to God that I will."
"baba" <ba*************@yahoo.com> wrote in message
news:ci**********@bagan.srce.hr...
| Hi everybody.
|
| I have to make an entity EJB, one field of which should be an array of
| Strings (for instance a Car EJB and one field should be a list of people
who
| have permission to use it).
|
| Can somebody tell me in a few words what's the best way to model this?
|
|
You cannot have an array of Strings as a property of a CMP EJB, you will
need to create a PersonEJB and set up a one-to-many relationship from your
CarEJB to your PersonEJB.
Do you really need EJB for this? EJB is quite invasive of your code & quite
an overhead for something this simple. Have you looked at other persistence
mechanisms? Hibernate would be ideal for this
http://www.hibernate.org/
--
-P
"Much as some folks hate to lose their way, me, I pray to God that I will."