Hi again, > > 1. OJB does *not* perform "select * from", for queries! > > If you look up objects of class x OJB will read the > class-descriptor for > > class x and determine all necessary columns to materialize > an x instance. > > The performed select contains all those columns. > > > > If you want to limit the number of columns you can modify the > > class-descriptor for class X do get a reduced number of columns. > > > > So, if i needed a full person to be materialized in one place > and only the > id, firstname and lastname elsewhere then I would have to > write a couple of > classes and their associated class-descriptor. For example my > PersonName and > Person would be two different object classes that are > populated from the > same table (PEOPLE).
NO! You only need one persistent class Person. You can modify the existing class-descriptor for class Person at runtime. that is for one query you remove all columns you don not want to see from the classdescriptor. After finishing the query you restore the class-descriptor to its original Form so that all other things work normally. > > Is there some thorough docs on this. not yet, but Jakob is working on query documentation. >I looked into the > javadocs but it left > me with several questions. What do you mean by tabular > representation of > resulsets? What does tabular mean? tabular means: not a collection of fully materialized objects, but an Iterator that produces Object Arrays on iterator.next() Just try it out and have a look at our Junit tests using this feature. > Also what is the > ReportQuery meant to > address or solve in the course of coding with OJB? How is the > getReportQueryIteratorByQuery(Query query) different from > getIteratorByQuery(Query query)? That's explained in the PB API Javadocs. > How do i combine ReportQueries with > QueryBySql? I am sorry i have so many questions. QueryBySql implements Query. Thus you can use QueryBySql (that is freeform SQL can be used as a query) > I noticed that something the documentation lacks is a good > visual diagram of > the components contained within OJB and theif defined > purposes in the course > of the various use cases in ojb. OJB now consists of more than 500 classes; contributing full documentation of all aspects would take quite a long time... The core developer team is focussing on design and implementation. If you compare the OJB docs with other opensource projects you will see that we take documentation seriously. Of course we appreciate all help to improve documentation! > I am very grateful for the > time and energy > that you have put in Thomas. I would like to help. As i > understand this more > I would like to put together a reference that clearly defines > the different > elements of OJB's persistence broker and how they are related to one > another. Great! > I am not familiar enough with JDO and ODMG to do > anything there. If > there is already a resource like this it would be great to know about. > > Also, on a side note. I was looking at the Proxy sample code > in the Advanced > O/R Mapping and i noticed in the proxy sample that the super(uniqueId, > broker) was being called and when i looked into the > VirtualProxy class i > found no constructor that would be called with the provided > parameters in > the super method call. Has the base code changed or did i > miss something in > the javadocs? > I assume it's an incosistency in the documentation. cheers, Thomas > > > > > or is this just not > > > possible apart from > > > using a sql statement call from the PB API's QuerBySQL (if > > > that would even > > > work cuz i haven't tested it). If i can't be selective about > > > the data that > > > populates my People object then I will produce a lot of > > > unecessary data > > > collection and population from the database to my objects. > > > Especially if the > > > NOTES field can contain 250k of data (an exaggeration of > > > course but the > > > point is there). The thing that attracted me to OJB was how > > > easy it is to > > > code to a database with OO patterns. I hope the solution > > > isn't something > > > that requires me to write some kind of extra class each time > > > i want to limit > > > what is populated in my People class or require me to create > > > a whole new > > > class to handle just the listing of the basic people info. > > > > This would be a third solution, but as there are two others it's not > > mandatory... > > Thanks, > Brandon Goodin > Phase Web and Multimedia > P (406) 862-2245 > F (406) 862-0354 > [EMAIL PROTECTED] > http://www.phase.ws > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
