EOF 2.2 User Patch 3 Overview

This document contains release notes for EOF 2.2 User Patch 3, an update to Apple's Enterprise Objects Framework on Windows NT. This patch incorporates all EOF bug fixes released in EOF 2.2 Patch 1 and 2, the WebObjects 3.5.1 Database Adaptor Patches and the WebObjects Java Patch 2. This patch should only be applied to systems with EOF 2.2 installed. This patch only addresses user-level issues. EOF 2.2 developers should also see article 70057 for more information on EOF 2.2 Developer Patch 2.

The WebObjects Current Patch List, article 70037, contains information on all available patches and workarounds for all versions of WebObjects, including EOF patches. The OPENSTEP Current Patch List, article 70033, contains information on all available patches and workarounds for all versions of OPENSTEP, including EOF patches. Please read these documents if you're not sure which patches you need on your system.
Installing EOF 2.2 User Patch 3 on Windows NT 4.0

1. Download the Windows NT version of the patch from Apple's FTP site at ftp.info.apple.com. Also download the installer script, "patcher.nt.sh".

2. Log in as a user with Administrator privileges.

3. Open a Bourne shell. The Bourne shell should be available from your Start menu, under the WebObjects program group, or under your Apple root directory at NextLibrary\\Executables\\sh.exe.

4. Change to the directory containing the patch and the patch installer, "patcher.nt.sh".

5. Type the following at the shell prompt (make sure that there are no EOF applications running first):

./patcher.nt.sh -install EOF22_NT_User_Patch3.TAR.gz

For more information on using the patcher.nt.sh program, type the following at the command prompt:

./patcher.nt.sh -help

6. Reboot your Windows NT system

Issues Fixed

Corrected in EOF 2.2 User Patch 3

Editing context should not decrement snapshot retain count when forgetting a fault
Apple reference # 2326799

ISSUE:
When an editing context was released, the snapshot retain count was decremented for all of its registered objects, both "real" objects and faults. Since the snapshot retain count is only incremented when "real" objects are registered, this caused the snapshot retain count to be too low for faulted objects. An exception might be raised later because the snapshot had been released prematurely. This problem was listed as corrected in the release notes for EOF 2.2 User Patch 2, but the fix was not actually included in that patch.

RESOLUTION:
EOEditingContext now decrements the snapshot retain count only for complete objects, not for faults.

Corrected in EOF 2.2 User Patch 2

EOF applications crash accessing SQL Server 7
Apple reference # 2315234

ISSUE:
EOModeler and other EOF-based applications crashed when trying to connect to Microsoft SQL Server 7.0.

RESOLUTION:
The EOF ODBC adaptor has been updated, enabling EOF applications to connect to SQL Server 7 without error.

Java project recompilation
Apple reference # 2315243

ISSUE:
In order to take advantage of a bug fix in an upcoming WebObjects patch, some EOF Java projects needed to be recompiled.

RESOLUTION:
The relevant projects have been recompiled in this patch.

ODBC adaptor generates spurious login error message
Apple reference # 2315563

ISSUE:
While defining a new model or switching a model's adaptor to ODBC, the first attempt to connect to the database failed and a misleading "invalid login" error message was displayed. However, if the user continued with the login, entering the correct user name and password, the login succeeded. Subsequent attempts to log in with the same model did not produce this false error message.

RESOLUTION:
The connection information associated with the initial login panel is now properly constructed.

ODBC adaptor prepends owner to table name
Apple reference # 2319114

ISSUE:
When reverse engineering a Microsoft SQL Server database with ODBC, the table names all had the form OWNER.NAME instead of just NAME.

RESOLUTION:
The table names no longer have the owner prefixed to the name.

Snapshot refcount not incremented correctly with Entity Caching turned on.
Apple reference #2327400

ISSUE:
With entity caching enabled, the snapshot retain count was not correctly incremented when an entity was cached. Since the retain count was too low, a crash could result when attempting to access a cached entity whose snapshot had been released too soon.

RESOLUTION:
The EOAccess framework now increments the snapshot retain count for each object in an entity when the entity is cached and decrements the snapshot retain count for each object when the cache is invalidated.

Corrected in EOF 2.2 Patch 1

OracleEOAdaptor generates incorrect SQL for left and right outer joins
Apple reference # 2165674, 2288089

ISSUE:
The SQL generated by the Oracle adaptor for a left outer join was actually the syntax for a right outer join, and vice versa.

RESOLUTION:
The Oracle adaptor now generates the correct SQL for left and right outer joins.

EODatabase never releases snapshots
Apple reference # 2169671, 2231693

ISSUE:
Snapshots associated with enterprise objects were never released.

RESOLUTION:
EOF now tracks references to an object and releases the object's snapshot when there are no more references to it

Newly inserted objects not deleted correctly
Apple reference # 2176466, 2253191

ISSUE:
An object created and inserted into an editing context or relationship, then deleted before being saved to the database, was not completely removed from the editing context. This caused an exception to be raised the next time the editing context was saved.

RESOLUTION:
Deletion of a newly-inserted object now completely removes the object from the editing context.

Optimistic locking fails on rows with trailing spaces
Apple reference # 2177721, 2231704

ISSUE:
OracleEOAdaptor stripped trailing spaces from VARCHAR2 data fetched from or committed to an Oracle database. If VARCHAR2 data containing trailing spaces had been inserted by another tool, optimistic locking failed for any affected row and the row could not be updated.

RESOLUTION:
OracleEOAdaptor no longer strips trailing spaces from VARCHAR2 data.

Incorrect NSNumber formatting for zero values
Apple reference # 2181645, 2264031

ISSUE:
Zero values for number fields displayed by EOF did not always have appropriate formats for their types. For example, some integer zero values were represented as "0.00".

RESOLUTION:
EOEntity has been modified to format zero values appropriately for all number types.

Logic error in EOAccess layer sometimes raises exception while generating primary keys
Apple reference # 2182084, 2278561

ISSUE:
Under certain circumstances, the EOAccess code that generates primary keys sent a message to inappropriate objects causing a "NoSuchMethodError" exception to be thrown in Java or one of several exceptions to be raised in Objective C.

RESOLUTION:
EOAccess now checks the class of the receiver before sending the message that was causing the issue.

EOModeler can't create a model with EODeleteRuleNoAction
Apple reference # 2202107, 2248443

ISSUE:
In EOModeler's AdvancedRelationship inspector, if the Delete Rule was set to "No Action", the following warning was posted the next time the model was opened:

Invalid delete rule string:'EODeleteRunNoAction' on entity with name: '<entity_name>'

This issue could also affect applications which create their own models.

RESOLUTION:
This issue was caused by a simple typographical error which has been corrected. It is now possible to create models with EODeleteRuleNoAction.

EOQualifier qualifierWithFormat methods conflict
Apple reference # 2203613, 2275802

ISSUE:
If a qualifier was created using +[EOQualifier qualifierWithQualifierFormat: arguments:] and, subsequently, another qualifier was created using +[EOQualifier qualifierWithQualifierFormat:], a parse error occurred, even if the second qualifier was valid.

RESOLUTION:
The interference between these two methods has been removed and they now operate correctly.

selectObject: method return values don't match documentation
Apple reference # 2205357, 2275804

ISSUE:
The [EODisplayGroup selectObject:] method would only returned 'NO' if it could not end editing or if the delegate refused the change. According to the class documentation, it should also return 'NO' if the EODisplayGroup's displayedObjects array does not contain a match with the method's object argument.

RESOLUTION:
As stated in the documentation, this method now also returns 'NO' when it cannot find a match for the argument object.

Sybase can't fetch float and text data together
Apple reference # 2208497, 2259088, 2274601

ISSUE:
The Sybase adaptor could not fetch data of types text and float together.

RESOLUTION:
The adaptor has been fixed so that there is no longer a conflict between these data types.

EOControl layer raises exception while building qualifier
Apple reference # 2213188, 2271206

ISSUE:
The qualifier parsing code in the EOControl layer incorrectly sends copyWithZone: to custom enterprise objects under certain conditions, causing a "selector not implemented" exception to be raised in Objective C or a "CloneNotSupportedException" to be thrown in Java.

RESOLUTION:
copyWithZone: is no longer called on custom enterprise objects when building a qualifier.

Nil value in EOAttribute causes crash while saving EOModel
Apple reference # 2220588, 2274226

ISSUE:
In certain circumstances, a crash occurred during the save of an eomodel because a nil serverTimeZone attribute was being inserted into the eomodel.

RESOLUTION:
The EOAccess layer has been changed to test for and handle a nil value for this attribute.

Exception while writing an eomodel to disk corrupts the model
Apple reference # 2220893, 2274225

ISSUE:
If an exception was raised while an eomodel was being written to disk, the original model was lost and only the partially-written or corrupted model was left on the disk.

RESOLUTION:
A backup copy of the eomodel is now made before the write begins. If an error occurs during the write the partially-written file is saved as <model_name>.eomodeld# and the original eomodel is restored from the backup.

Prefetching can mysteriously fail
Apple reference # 2223730, 2264033

ISSUE:
Prefetching would sometimes failed for no apparent reason, due to inappropriate filtering of relationships inside the EOAccess layer.

RESOLUTION:
The incorrect filtering on prefetches has been removed from EOEntity.

Unnecessary firing of to-many faults
Apple reference # 2227660, 2248080

ISSUE:
If the PropagatePrimaryKey flag on an EOEntity was set to YES, saving changes to the EOEditingContext caused array faults for all of that entity's to-many relationships to be fired. This was not necessary and could cause performance issues.

RESOLUTION:
The EOAccess layer has been changed so that it no longer fires unnecessary faults.

EOFault retain/release behavior conflicts with Java bridge
Apple reference # 2239504, 2297785

ISSUE:
EOFault's special handling of retain and release sometimes caused conflicts with the Java bridge.

RESOLUTION:
The retain and release behaviors of EOFault have been modified to interoperate correctly with Java via the bridge.

Incorrect Sybase smallint mapping
Apple reference # 2241377, 2247522

ISSUE:
On HP-UX and Solaris, data with the Sybase type smallint was mapped to NSNumber/Integer and assigned the original value times 2 ^16 when retrieved from a Sybase database.

RESOLUTION:
The Sybase adaptor now correctly maps smallint data to type NSNumber/Short and does not modify the value.

No EOActionCellAssociation for most controls
Apple reference # 2243956, 2269874

ISSUE:
EOActionCellAssociation did not work with controls other than NSTextField in EOF 2.2 and WebObjects 3.5.1.

RESOLUTION:
This class has been changed to work with NSButtons and other controls, as well as NSTextFields.

Can't use Sybase 11 stored procedures
Apple reference # 2244533, 2274650

ISSUE:
The Sybase adaptor was unable to interpret stored procedures created in Sybase 11.

RESOLUTION:
The adaptor has been fixed to work properly with stored procedures from both Sybase 10 and Sybase 11.

Case-insensitive matching sometimes fails
Apple reference # 2248977, 2275805

ISSUE:
Case-insensitive matching in EOQualifier did not correctly match uppercase letters in the search pattern with lowercase letters in the receiving string.

RESOLUTION:
EOQualifier has been fixed. [EOQualifier isCaseInsensitiveLike:] now works correctly.

EOEntity methods raise exceptions
Apple reference # 2251180, 2256685

ISSUE:
Under some circumstances some methods of EOEntity, including setAttributes, setClassProperties, setRelationship, and removeRelationship, did not clear a private variable, potentially resulting in an application exception.

RESOLUTION:
These methods now handle their private instance variables correctly.

Oracle adaptor state not reset when closing the database channel fails
Apple reference # 2252175

ISSUE:
If the Oracle adaptor encountered an error while closing the database channel, the adaptor state was not reset correctly. As a result, the database connection could not be re-established on that channel once the database came back up.

RESOLUTION:
The Oracle adaptor now sets its internal state correctly before raising the error, allowing the connection to be re-established once the database is restored.

Multiple propagation primary keys create race condition
Apple reference # 2260541, 2267964

ISSUE:
Saving changes to two databases when both had a propagation primary key would not work in previous versions of EOF. A race condition occurred and only one database was able to generate primary keys.

RESOLUTION:
EODatabaseContext has been changed to correct this behavior. Both databases can now generate their primary keys correctly.

Special characters crash Sybase adaptor
Apple reference # 2260785, 2261262

ISSUE:
The SybaseEOAdaptor crashed when saving Text or BLOB data containing characters which could not be successfully encoded using the specified database encoding.

RESOLUTION:
The adaptor has been fixed to detect the encoding failure and raise an exception, so that a database encoding which is able to handle the issue characters may be specified in the connection dictionary.

Can't use smallints as arguments to Sybase stored procedures
Apple reference # 2262888, 2274608

ISSUE:
The Sybase adaptor did not allow the use of smallints as arguments to stored procedures.

RESOLUTION:
The Sybase adaptor now allows stored procedures with smallint arguments.

Java garbage collecting fails with EOEditingContext
Apple reference # 2264063, 2264251, 2270489

ISSUE:
EOEditingContext did not retain its registered objects. This could cause issues with Java garbage collection.

RESOLUTION:
EOEditingContext now allows users to specify whether editing contexts retain their objects or not with the new class methods setInstancesRetainRegisteredObjects:flag:, getInstancesRetainRegisteredObjects, and reset. For API details, please see EOEditingContext.h. By default, in applications which contain Java, the editing context does retain all registered objects.

Deallocating an EODatabase containing snapshots causes crash
Apple reference # 2265751, 2272549

ISSUE:
EODatabase released its snapshots too early during deallocation, causing a fatal exception to be raised if any snapshots were present.

RESOLUTION:
The order in which instance variables are released by EODatabase has been corrected.

Memory leak in EODisplayGroup
Apple reference # 2217263, 2256402

ISSUE:
A private variable was not being released in EODisplayGroup, causing a memory leak.

RESOLUTION:
This variable is now released correctly.

Informix adaptor crashes on failed referential integrity check
Apple reference # 2272207, 2274351

ISSUE
If the InformixEOAdaptor was unable to find matching source and destination entities of a referential integrity constraint, it passed a nil pointer to the database, causing a crash.

RESOLUTION
The InformixEOAdaptor now detects this condition and handles it appropriately.

Incorrect time zone conversions in the SybaseEOAdaptor
Apple reference # 2276899, 2276907

ISSUE:
When converting a time value to the server time zone, the SybaseEOAdaptor only substituted the server's time zone without actually adjusting the time value for the zone difference.

RESOLUTION:
SybaseEOAdaptor now performs the conversion of the time value to the corresponding value in the server's time zone.

Can't subclass entities with fetch specifications
Apple reference # 2278492, 2279849

ISSUE:
Due to an error in EOKeyValue encoding, EOModeler was unable to create a subclass when a fetch specification was associated with the entity being subclassed.

RESOLUTION:
The encoding is now correct and entities with associated fetch specifications can be subclassed from within EOModeler.

Deleting objects with "toManyToOne" relationships sometimes fails.
Apple reference # 2278795, 2287021

ISSUE:
In some circumstances, EOF did not correctly handle deletion of an object with a toManyToOne relationship, leaving rows in intermediate tables which should have been deleted.

RESOLUTION:
The EOAccess layer now does a more thorough analysis of an object's relationships when it is deleted, and data in intermediate tables is correctly removed.

BusinessLogic framework fails to retain some global IDs
Apple reference # 2290233, 2290236

ISSUE:
Several classes in the BusinessLogic framework example failed to retain global IDs for some enterprise objects, resulting in messages being sent to unexpectedly freed objects.

RESOLUTION:
The classes now retain global IDs appropriately.

Editing the owning relationship in a nested editing context more than once corrupts the database snapshots.
Apple reference # 2280979, 2287025

ISSUE:
Due to an error in the processing of array faults by the database context, editing the owning relationship in a nested editing context more than once corrupted the database snapshot for the owning object, resulting in database corruption.

RESOLUTION:
The error in EODatabaseContext has been corrected.

EODisplayGroup instances leak
Apple reference #2286314

ISSUE:
Each EODisplayGroup instance leaked two EOObserverProxy objects.

RESOLUTION:
This leak in EODisplayGroup has been fixed.

Incorrect time zone conversion in EOAccess layer.
Apple reference #2287379

ISSUE:
When converting a time value to the server time zone, the EOAccess layer substituted the server's time zone without actually adjusting the time value for the zone difference.

RESOLUTION:
EOAttribute now performs the conversion of the time value to the corresponding value in the server's time zone.

Corrected in EOF 2.2 Sybase Adaptor Patch

All parameters required for Sybase stored procedures
Apple reference # 2203081

ISSUE:
If you did not supply all values when executing a Sybase stored procedure, the execution would fail with an exception like:

Feb 19 11:23:53 WOF_3_5_Sybase_Patch[1027] Caught exception:EOGeneralAdaptorException

Sybase: Server:unknown Procedure:NEXT_MOVIE_PRIMARY_KEY Line:0 Procedure NEXT_MOVIE_PRIMARY_KEY expects parameter @A_MOVIE_ID, which was not supplied.

This happens even though A_MOVIE_ID is not required for the stored procedure.

RESOLUTION:
The Sybase adaptor no longer requires optional arguments to stored procedures.

Corrected in EOF 2.2 ODBC Adaptor Patch

ODBC Adaptor cannot execute stored procedures with output parameters
Apple reference # 2208503

ISSUE
The EOF 2.2 (WebObjects 3.5) version of ODBCEOAdaptor.framework introduced a bug which causes an error when using a stored procedure with an output parameter.

RESOLUTION
The ODBC adaptor now handles output parameters correctly.

ODBC adaptor leaks connections with Microsoft Access
Apple reference # 2209574

ISSUE:
The EOF 2.2 (WOF 3.5) and earlier versions of ODBCEOAdaptor.framework did not release ODBC connections when using Microsoft Access (or any JET based data source) in order to work around a bug in the Microsoft odbcjt32.dll library; this bug caused a crash when SQLFreeConnect was called. The SQLFreeConnect bug was discovered in version 3.40.2829 of the DLL. Newer versions of the DLL (beyond 3.50) no longer exhibit the crashing issue.

RESOLUTION:
The patched version of this framework now checks the version of the DLL more carefully and allows SQLFreeConnect to be called unless the DLL version is 3.4X. The adaptor no longer leaks the ODBC Connection when running with fixed versions of odbcjt32.dll.

Disclaimer

THE SOFTWARE PATCH PROVIDED FROM APPLE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, EXPRESS OR IMPLIED. APPLE SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL APPLE BE LIABLE FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO ANY LOST PROFITS, LOST SAVINGS OR ANY INCIDENTAL OR CONSEQUENTIAL DAMAGES, WHETHER RESULTING FROM IMPAIRED OR LOST DATA, SOFTWARE OR COMPUTER FAILURE OR ANY OTHER CAUSE, EVEN IF APPLE IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY OTHER CLAIM BY CUSTOMER OR FOR ANY THIRD PARTY CLAIM.

Published Date: Feb 20, 2012