+formatValue:forAttribute: bug

From EOFWiki
Jump to: navigation, search

The problem with this method is, that it is a class method, and the implementor can not draw on the information available to the EOAdaptor the command is to run on. This is important, because the EOAdaptor and to be strict only the EOAdaptorChannel knows, under what SQL environment the command will run.

Note that formatting of dates and numbers are specific to the locale. The actual proper way to do this is to delay, the generation of SQL to the time the adaptor calls the "statement" method, and rename this to "statementForAdaptorChannel":. The pass the adaptorChannel into the formatValue:forAttribute:adaptorChannel: method.

Personal tools