Forums Register Login

How do equivalent to RDMS Domain Tabloes in EJB?

+Pie Number of slices to send: Send
How would I BEST implement the following in EJB?

In RDBMS I might have Customers all with many types of Addresses. That relationship could be modeled by:

CustomerTable --> CustomerAddressesLinkTable <--AddressTable

Where you put a unique constraint on the AddressID in the link table and make the combo of the two keys (CustomerID + AddressID) the primary key.

OK, so far I'm fine in translating this to EJB.

Now we say that Customer's can have a Work Address, a Home Address, etc. In a database I'd simply have a Domain Table (or Type Enumeration Table) that links to AddressTable:

AddressTable <--AddressType

Where AddressType would be:

1, "Work Address"
2, "Home Address"

etc.

I'm not sure where to put this info in EJB. It doesn't seem right (or seems like overkill and a misrepresentation) to make it an Entity Bean. I'm also not sure how I'd make it a part of AddressBean since in the database it should be in its own table. Any ideas?
You didn't tell me he was so big. Unlike this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 479 times.
Similar Threads
CMR configuration confusion
Struts2 problem with if tag inside iterator
Using Oracle sequence with JBOSS
Result of HQL for associated objects
Hibernate: Join fetching (non lazy) of an object.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:35:06.