Leon -

This is by far the most concise explanation I've seen yet on this topic.  I
think you have the basis for your "Getting Started with Peer" document.

Parker.



----- Original Message -----
From: Leon Messerschmidt <[EMAIL PROTECTED]>

Hi,

Try using *OMGenerator to create Peer / MapBuilder / Data-Object classes
for you.
You will end up with classes like Book, BookPeer, BookMapBuilder, etc....
BookMapBuilder just adds information about he Book table to a databasemap.
It is
rarely called directly and it should work seamlessly in the background.
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.

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.

~ Leon


----- Original Message -----
From: Diethelm Guallar, Gonzalo <[EMAIL PROTECTED]>



> Hello,
>
> When would I want to use MapBuilders? The
> MySQLSchemaToDatabaseMap class tells the story on
> how it reads a MySQL schema and creates a populated
> DatabaseMap for that schema. Then, it says, you could
> generate your MapBuilder classes.
>
> Now, let's say I'm adding a few tables to the schema
> (say, BOOK, AUTHOR and BOOK_AUTHOR). Do I need to do
> this at all?
>
> I've been reading the source java files, and still
> haven't gotten to the Peer classes that others
> recommended to handle DB I/O; I'm wondering if
> generating MapBuilder classes is related to Peer
> objects at all.
>
> Thanks,




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