Thanks Max, > -----Original Message----- > From: Max Rydahl Andersen [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 02, 2002 9:47 AM > To: OJB Users List > Subject: Re: SELECT statements and OJB > > > > > > 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. > MAX SAYS: "And this will not influence e.g. other threads running in the same vm that is querying for class Person ?"
Thomas, that was my next question. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
