> hmmm....don't know if it would be great to hold a reference to an object 

> in the exception...but maybe extend the message with information 
> (textual representation of the object) would probably be ok....

OK. So, add a toString() to the JDBCException's message. It's a good idea.

I want to make sure I understand your concern. While I see the need to be 
circumspect about this sort of thing, I'm having trouble thinking of cases 
where holding the reference in the Exception could actually cause a 
problem. We're talking about times where the Exception will outlast the 
Object, right?

Please, this is purely hypothetical - I'm just trying to learn about how 
things work.

> >And then as I consider alternatives, I consider making the bean 
> >Validateable, and ideally using a utility class to check the String 
> >properties against length values in the persistence metadata. But when 
I 
> >look through ClassMetadata and Type, I can't find the "length." Am I 
> >missing it? Or is it not there?
> > 
> >
> It is available from Configurations metadata.

Thanks! I see it now. I was thrown off by the manual's directions 
regarding the metadata available via SessionFactory. For the benefit of 
the archives:

Configuration.getClassMapping(), to getProperty(), to getColumnIterator(), 
to getLength() on the Column object.


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to