hey all,

I'm showing my newness to castor here, but I'm really struggling to figure
out why castor doesn't seem to like mapping a Timestamp to a MS-SQL
datetime field.  Anyway, I'm trying to get a look at the sql, but really
have no idea about how to get the mapping object that I think I need.

I'm not mapping to xml at all, only object <-> rdbms.  The docs at
http://www.castor.org/tips-tricks.html say:

Using a logger with org.exolab.castor.mapping.Mapping will provide
detailed information about mapping decisions made by Castor, as well as
show the SQL statements being used.

but I cant figure out which Mapping object to use.  I've tried just
creating one and setting the logger on that, but (not surprisingly) that
didn't work... I cant see any connection between the Mapping object and
the JDO object... if someone could take two minutes to point me in the
right direction regarding how I get access to the sql I'd be very greatful
(o:

this is what I'm doing atm:

            Mapping mapping = new Mapping( getClass().getClassLoader());
            mapping.setLogWriter(new PrintWriter(new
               FileWriter("mapping-debug.txt")));
            mapping.loadMapping(getClass().getResource(MAPPING_FILE));
            
            JDO jdo = new JDO();
            jdo.setLogWriter(new PrintWriter(new
                FileWriter("jdo-debug.txt")));
            jdo.setConfiguration(
                getClass().getResource(DATABASE_FILE).toString());
            jdo.setDatabaseName(DATABASE_NAME);

but not getting any output - I can see the files being created, but thats
it.

thanks in advance (o:

cheesr
dim


On Tue, 25 Sep 2001, Dmitri Colebatch wrote:

> hey all,
> 
> from reading the docs, I gather the way to find what sql castor is
> executing is to set a logwriter on the Mapping object.  Now I'm sure I'm
> missing something simple, but short of creating my own, I cant see how I'm
> actually suppose to get a reference to the mapping object.  I was hoping
> to find something in JDO that would give me access to it, but no....
> 
> if someone could point me in the right direction here I'd be thankful.
> 
> cheers
> dim
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
> 
> 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to