Hi Ramsey, On 2011-08-24, at 9:42 AM, Ramsey Gurley wrote: > > Just thought I would add that if you are using wonder's database context > delegate, you can also provide your own ERXSQLHelper.OracleSQLHelper subclass > via a property > > Oracle.SQLHelper=com.whatever.MyOracleHelper > > and override the handleDatabaseException method on it to handle the general > adaptor exception that happens when the unique constraint fails. > > As Chuck mentioned, the quality of the message you receive from your database > may make this approach useless (ahem... MySQL), but if you can figure out the > modeled index from your database exception, this might do the trick. > > Also, if you do it this way, make sure you call context.rollbackChanges > before throwing your validation exception.
Wasn't there some problem with this, like it did not work? Or did you get that fixed? I recall someone trying this and it ending in unhappiness. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
