Ok just finally hit the massive power behind OJB, and it seems to be
working except I'm a bit confused on how to get data from one part. I
followed the examples in Tutorial 3 of Manual Decomposition of 1:n. I
have 3 tables:
Home
Brokers
BrokersToHomes
I have setup the repository xml accordingly with the proper collections
in my beans. I then do a very simple select:
select home from com.codepuccino.business.HomeBO where homeID = 56;
When the OQLQuery is executed, everything goes great. At this point I
create a HomeDetailView, which contains everything this select brings
back including Home details, BrokersToHomes, Visits, Disclosures, Rooms
and Amenities. I can't believe one select can do so much, so quickly
and so simply!
The issues I have is that in order for me to get to the Broker
information I have to do this (it's my test)
Iterator it = hview.getBrokerHomesColl().iterator();
while(it.hasNext())
{
BrokersToHomesBO bth = ( BrokersToHomesBO )it.next();
BrokerBO bro = bth.getBrokerBO();
System.out.println("The Bro Name is: " + bro.getName() );
}
Is this normal, or is this a sign that I have some piece missing? It
would be easier of course to iterate through BrokerBO, but I guess it's
no big deal, I just want to make sure that this is not a symptom of a
misconfiguration.
I've never used Object Brokers before, OJB is my first and man... This
stuff just ROCKS!
R
--
Robert S. Sfeir
Senior Java Engineer
National Institutes of Health
Center for Information Technology
Department of Enterprise Custom Applications
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
