Ok, some new info on this:

> Try using *OMGenerator to create Peer / MapBuilder / 
> Data-Object classes
> for you.
> You will end up with classes like Book, BookPeer, 
> BookMapBuilder, etc....

I was able to accomplish this, and have now my classes.

> BookMapBuilder just adds information about he Book table to a 
> databasemap.
> It is
> rarely called directly and it should work seamlessly in the 
> background.

Ok, this is a problem right now, because this class does NOT
compile:

  AuthorMapBuilder.java:15: no interface expected here
  public class AuthorMapBuilder extends MapBuilder
                                        ^

(which is correct, since MapBuilder is an interface, not a class).
Ok, I replaced MapBuilder with TurbineMapBuilder (I guess this
is a problem due to the way I used the OMGenerator class), and got
an error message saying dbMap is private and can't be accessed
from a derived class. I changed dbMap to protected in TurbineMapBuilder,
recompiled Turbine and finally was able to compile BookMapBuilder.
Am I doing anything wrong here? Is the switch from private to
protected a patch that should be applied in Turbine?

> BookPeer
> is a class full of static methods you use to do 
> inserts/updates/delete from
> your
> actual table.  Book is a Data-Object class that gives you a JavaBean
> representation of a table row.

I was able to compile these two as generated.

> You would typically use it like this:
> 
> Criteria crit = new Criteria;
> crit.add (BookPeer.BOOK_ID, 2, " > ");
> Vector v = BookPeer.doSelect (crit);
> 
> Now v will contain a list of Book objects each representing a 
> row in the
> BOOK
> table where the BOOK_ID is larger that 2.

I'm about to give this a try...

> ~ Leon


-- 
Gonzalo A. Diethelm
[EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to