From: "Maarten Coene" <[EMAIL PROTECTED]> > Isn't it possible that Torque can check these data values? This way, Torque > can throw an Exception if some values have the wrong type (I guess the peer > classes know the correct types of the values?) before talking to the > database. In this way, Torque behaves the same for all databases ...
I don't think this should be Torque's jurisdiction. If it had to check all of the data that was coming in to make sure that it fit a specific column type, then you'd get into performance issues. The peer classes know what *database* type a column is, but not what java type. Since one database type can be mapped to many java types and visaversa, that would be an expensive check. In this case I think if the client isn't taking steps to make sure that it's not putting garbage in, then it should expect to get garbage out. (GIGO.. does anyone still use that term?) -Roy > > thanks, > Maarten > > At 09:57 21/06/2002 -0400, you wrote: > >I believe that's more of a difference in databases (or the JDBC drivers of > >those databases); Oracle throws an error if you try to specifiy a string > >for an Integer column, MySQL doesn't care, and returns empty results. > >There's really no way of Torque knowing if it will get an error or an empty > >resultSet, since it's DB independent. You might want to check the data > >clientside to make sure that what's going into the SQL query really is an > >integer, so the results from Torque will be predictable. > > > >Roy > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
