You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Cohen, Steve" <SC...@officemax.com> on 2003/06/10 17:32:02 UTC

Materializing a single object that uses several database tables.

Hi all,
We're starting to use OJB to replace hand coded SQL in some of our objects
now. Due to a flaky architecture, we have a 'User' object that maps to
several tables. Here is the schema:

BV_USER
	USER_ID		INTEGER
	ACCOUNT_ID		INTEGER
	USER_ALIAS		VARCHAR
	PASSWORD		VARCHAR

BV_USER_PROFILE
	USER_ID		INTEGER
	FIRST_NAME		VARCHAR
	EMAIL			VARCHAR
....and about 50 more columns.


We have one object that encompasses both these tables (I'm not sure why
BroadVision designed the table structure like they did, but we have to live
with it). Is it possible to have OJB materialize this object with both the
password and email address intact?

I could probably do this with a reference descriptor pointing to an internal
class that would be exposed via a facade, but I really don't think that is
the cleanest way of handling it.
Any ideas?

By the way, we've done stress testing of OJB and deem it fit for production
on our site which has over 2 million users. Great work.



Steve   Cohen
Senior Software Developer
(216) 471-3824
scohen@officemax.com