2009-02-16 Quentin Mathe <qmathe@club-internet.fr>

	Fixed COProxy related test failures reported by Truls Becken. 
	* COProxy.m (-isPersistencySelector:): Fixed to test selector equality 
	correctly.

2008-11-14 Quentin Mathe <qmathe@club-internet.fr>

	* COObjectServer.m: Added some debug logging facilities.
	* COObjectContext.m (commitMergeOfInstance:forObject:): Fixed to always log 
	the new version resulting of the snapshot in the history of the context. 
	When anObject wasn't nil, we were wrongly logging the current version of 
	anObject, which isn't the new (or latest) version as soon as the snapshot is 
	taken.
	* COOObjectContext+GraphRollback:
	Disabled some logging.
	(-_restoreToVersion:, -logRestoreContextVersion:): Don't increment the 
	context version in the latter method but in -_restoreToVersion:. So all 
	restored objects are logged with the context version of the restore point.
	(-findAllObjectVersionsMatchingContextVersion:): 
	Fixed to correctly order the query result on a restore point where multiple 
	rows have the same context version (related and made possible by 
	-commitMergeOfInstance:forObject:). 
	Implemented two strategies that deal with the traversal of restore points, 
	to correctly reconstruct the object graph when restoring the context. The 
	first is dead simple, but cannot take in acccount insertion/deletion of 
	objects logged in the history, the other one is more complex but accurate 
	and reflects what the object graph state is really: a list of messages where 
	restore points are jumps or continuations in this message flow.
	Now the context is properly restored in the following case:
	- any operations (this includes arbitrary restorations interleaved with 
      normal changes or not)
	- restore to a past context version as a new version t1
	- new changes in this context
	- restore to a context version t1 - n
	Before the bug fixes of this commit, context(t1 - n) was most of the time 
	an invalid object graph.
	(-lookUpVersionIfRestorePointAtVersion:): Fixed to handle the case where 
	multiple rows exist with the same context version for a restore point. This 
	only occurs now because of the change to -commitMergeOfInstance:forObject:.
	This fix is similar to the one done for the previous method.
	(-collectObjectVersionsRestoredByContextVersion: inQueryResult:forRow:
	withDictionary:): Added.
	* TestGraphRollback.m: Major test update to cover the previous changes. This 
	includes various improvements of the test class not yet fully exploited by 
	all test methods.

2008-11-12 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COObjectServer.h:
	* COObjectServer.m: 
	(-lastVersionOfObjectWithURL:): Moved existing code into the next method 
	and rewritten this one to take in account the possibility to have a last 
	version that is a snapshot without an associated delta.
	(-lastDeltaVersionOfObjectWithURL:): Added.
	* TestObjectContext.m (-testLatestVersion): Updated to match the new 
	expectations

2008-11-04 Quentin Mathe <qmathe@club-internet.fr>

	Got COProxy really working. Added proxy-related unit tests. Almost fully 
	documented the API. Improved COProxy to support introspection, NSObject 
	methods and explicit declaration of persistency triggers. This last point 
	makes the persistency a lot safer, otherwise the proxy tends to wrongly 
	serialize method calls behind you back.
	Made various adjustements to avoid duplicating documentation accross classes 
	that implement the COManagedObject protocol.
	* COObjectContext.m:
	(-objectByRestoringObject:toVersion: mergeImmediately:): Fixed to handle 
	the commit of the restored object directly for a COProxy instance, instead 
	of calling -replaceObject:byObject:collectAllErrors:. This last method 
	doesn't handle COProxy well yet. 
	(-snapshotObject:shouldIncrementContextVersion:): Fixed to snapshot the 
	real object and not the proxy.
	(-logRecord:objectVersion:timestamp:shouldIncrementContextVersion:): Fixed 
	to use NSStringFromClass rather than -className which isn't part of NSProxy 
	protocol.
	* Headers/NSObject+CoreObject.h:
	* NSObject+CoreObject.m:
	* COObject.m: 
	Reworked documentation by moving up various method documentation into 
	COManagedObject protocol. Filled holes in the documentation.
	* Headers/COProxy.h:
	* COProxy.m: Major rewrite of the implementation to be usable, my first 
	attempt proved to be a really rough approximation. Added introspection 
	support on the real object through the proxy. Improved the 
	handling/forwarding of messages to get the proxy/model combo behaves exactly 
	as a usual object. Fully documented API.
	* TestProxy.m: Added.
	* GNUmakefile: Updated to include TestProxy.m.

2008-10-24 Quentin Mathe <qmathe@club-internet.fr>

	Finished to implement the low-level undo model discussed with Eric. I 
	thought I already fully implemented it, but in fact I hadn't :-)
	* Headers/COObjectContext.h:
	* COObjectContext.m: 
	(-undo): Rewritten.
	(-redo): Implemented.
	(-canRedo, -isUndoing, -isRedoing, -beginUndoSequence, -endUndoSequence): 
	Added.
	(-logRecord:objectVersion:timestamp:shouldIncrementContextVersion:): 
	Modified to end the undo sequence if changes other than undo or redo actions 
	get logged.

2008-10-23 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COProxy.h:
	* COProxy.m:
	(+proxyWithObject:UUID:, -isManagedCoreObject): Added.
	* Headers/COObjectServer.h:
	* COObjectServer.m:
	A bit cleaning here and there.
	(-objectWithUUID:): Modified to rely on -objectWithUUID:version:.
	(-objectWithUUID:version:): Modified to transparently wrap the resulting 
	object into a COProxy if needed.

2008-10-21 Quentin Mathe <qmathe@club-internet.fr>

	* COMetadataServer.m:
	(-setUpDBWithURL:):
	(-setURL:forUUID:withObjectVersion:type:isGroup:timestamp:inContextUUID:):
	Modified to store UUID as PostgreSQL UUID type instead of text type.

2008-10-20 Quentin Mathe <qmathe@club-internet.fr>

	Initial work on a strict ownership of core objects by object contexts. 
	Added a contextUUID column to the UUID table of the metadata DB.
	* Headers/COObjectContext.h:
	* COObjectContext.m: 
	(-insertObject:): Added.
	(-logRecord:objectVersion:timestamp:shouldIncrementContextVersion:): Modifed 
	to only do an insert in the metadata DB on the version 0 of an object. Also 
	updated to call the renamed insert method of COMetadataServer.
	* Headers/COMetadataServer.h:
	* COMetadataServer.m:
	(-setUpDBWithURL:): Modified the DB schema to include a contextUUID column 
	in the main table.
	(-setURL:forUUID:withObjectVersion:type:isGroup:timestamp:): 
	Modified to include take an extra inContextUUID: parameter.
	* COObject.m (-tryStartPersistencyIfInstanceOfClass:): Updated to call 
	-insertObject:.

2008-10-15 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COObjectContext.h:
	* COObjectContext.m: 
	(-loadAllObjects, allObjectUUIDsMatchingContextVersion:, 
	-commitMergeOfInstance:forObject:): Added. 
	(-replaceObject:byObject:collectAllErrors:): Extracted the code that takes 
	care of taking a snaphot to record an object replacement into 
	-commitMergeOfInstance:forObject:.
	* COObjectContext+GraphRollback.m:
	(-lastObjectVersionForUUID:): Added.
	(-objectForUUID:version:): Modified to call 
	-commitMergeOfInstance:forObject:.
	(-_rollbackToVersion:): Improved to discard future objects when rolling back 
	the context to an old version. Before they were kept as cached objects. 
	Also improved to avoid the loading of objects whose versions haven't changed 
	between the target version and the current one.
	(-findAllObjectVersionsMatchingContextVersion:): Fixed to scan all the 
	history rather than exiting when the expected versions of the registered 
	objects have been found. By scanning all the history, we handle properly 
	the rollback of objects that aren't loaded. Until now only loaded/registered 
	objects were properly reverted.
	* COObjectServer (-cachedObjects): Added private getter used by the tests.
	* TestGraphRollback.m:
	Added a few tests to ensure the instances that belongs to the future are 
	properly discarded from the cache when the context is rolled back.
	(-currentInstance:): Added this shortcut method and updated the test 
	methods to use it.
	(-recreateObjectGraph): Rewrote to really load all the objects belonging to 
	the context, including any objects disconnected from the graph.
	(-testRecreateContextAfterRollback): Modified to force the loading of 
	objects when moving from version 4 to 16 of the context.

2008-10-13 Quentin Mathe <qmathe@club-internet.fr>

	* COObjectContext+GraphRollback.m:
	(-lookUpVersionIfRollbackPointAtVersion:): Added.
	(-findAllObjectVersionsMatchingContextVersion:): Modified to get the right 
	version to restore by calling -lookUpVersionIfRollbackPointAtVersion:.
	* TestGraphRollback.m (-testRecreateContextAfterRollback): Modified to 
	include a test for rolling back to a past rollback point.

2008-10-13 Quentin Mathe <qmathe@club-internet.fr>

	* COObjectContext+GraphRollback.m:
	(-mergeFreshObject:, -objectForUUID:version:): Added.
	(-_rollbackToVersion:): Improved to take care of recreating and merging 
	temporal instances that exist at the requested context version but not at 
	the current one. Also extended to resolve all faults for which objects exist 
	in memory.
	* TestGraphRollback.m: Added. Written a special test class for testing 
	the history navigation of the core object graph bound to an object context. 
	This code is a modularized and extended version of several existing test 
	methods from TestObjectContext.m.
	* GNUmakefile: Updated to include TestGraphRollback.m.

2008-10-10 Quentin Mathe <qmathe@club-internet.fr>

	Added fault handling to COObjectServer in order to support fixing faults for 
	all managed objects in memory, this is another missing piece for navigating 
	the history of an object context.
	Also tuned faulting behavior at COGroup level to integrate with these 
	changes and keep trace of unresolved faults rather than getting rid of them.
	* Headers/COGroup.h:
	* COGroup.m:
	(-replaceFaultObject:inArray:withObject:): Renamed to 
	-_tryReplaceFaultObject:inArray:withObject:, reworked the code to match the
	documentation and be usable by both -tryResolveFault: and -resolveFaults.
	Faults that cannot be resolved are now let as is rather than being ditched.
	(-tryResolveFault:, -_tryReplaceFaultObject:inArray:withObject:): Added.
	* TestGroup.m:
	Modified to create a fresh context and object server on each test method run.
	(-testTryResolveFault): Added.
	* Headers/COObjectServer.h:
	* COObjectServer.m:
	(-resolvePendingFaultsWithinCachedObjectGraph, -resolveAllFaultsForUUID:): 
	Added work-in-progress methods for dealing with faults at object server 
	level.
	* TestObjectServer.m: Added TestFaulting class.

2008-10-02 Quentin Mathe <qmathe@club-internet.fr>

	More work towards the ability to navigate the history of a context accross 
	a revert point. Modified to log snapshots into the context history, if they 
	aren't coupled with an invocation record.
	* Headers/COObjectContext.h:
	* COObjectContext.m:
	(-replaceObject:byObject:collectAllErrors:): Rewritten to correctly log the 
	replacement into the context history by taking in account whether it occurs 
	within a context rollback or not.
	(-logInvocation:recordVersion:timestamp:): 
	Renamed -logRecord:objectVersion:timestamp:shouldIncremementContextVersion: 
	and modified to support incrementing the context version for logging 
	snapshots in addition to recorded invocations.
	(-serializeInvocation:): Modified to log the base version snapshot.
	(-snapshotObject:): Modified to log the snapshot and moved metadatas 
	update into -snapshotObject:shouldIncremementObjectVersion:.
	(-snapshotObject:shouldIncremementObjectVersion:): Modified to update the 
	metadatas instead of relying on the caller to do so.
	(-init): Modified to use the added method for triggering the persistency if 
	needed.
	* TestObjectContext.m: Modified to take in account that snaphots such as 
	base version snapshots now increment the context version.

2008-10-02 Quentin Mathe <qmathe@club-internet.fr>

	Reworked the triggering of the persistency in -init in a way that is going 
	to allow to take the first snapshot right at initialization time.
	* Headers/COObject.h:
	* COObject.m:
	(-tryStartPersistencyIfInstanceOfClass:): Added.
	(-init): Modified to use the added method for triggering the persistency if 
	needed.
	* COFileObject.m (-init):
	* COGroup.m (-init):
	* TestObjectContext.m (-[SubObject init]):
	Modified to use -tryStartPersistencyIfInstanceOfClass:

2008-10-01 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COObjectServer.h:
	* COObjectServer.m:
	* Headers/COObjectContext.h:
	* COObjectContext.m:
	(-objectWithUUID:, -objectWithUUID:version:, -objectWithURL:): Moved these 
	methods into COObjectServer.
	(-playbackInvocations:fromVersion:toVersion): Extracted the core logic into 
	a new method in CODeserializer.
	* CODeserializer.m (-playbackInvocations:fromVersion:toVersion:): Added 
	by extracting code from COObjectContext.

2008-10-01 Quentin Mathe <qmathe@club-internet.fr>

	Moved delta and snapshot version querying methods from COObjectContext to 
	COObjectServer. This is an intermediate step towards moving the logic into 
	EtoileSerialize.
	* Headers/COObjectContext.h:
	* COObjectContext.m:
	* Headers/COObjectServer.h:
	* COObjectServer.m:
	Moved -lastVersionOfObjectWithURL:, -lastSnapshotVersionOfObjectWithURL:, 
	-lastSnapshotVersionOfObjectWithURL:forVersion: from COObjectContext to 
	COObjectServer.
	(-lastVersionOfObject:, -lastSnapshotVersionOfObject:forVersion:, 
	-objectWithURL:forVersion:): Updated to now rely on the object server for 
	getting the object versions.
	* TestObjectContext.m:
	* TestObjectServer.m:
	Moved -testLastSnapshotVersionOfObjectWithURL into COObjectServer tests.

2008-10-01 Quentin Mathe <qmathe@club-internet.fr>

	Reduced the amount of duplicated code for querying snapshot version.
	* Headers/COObjectContext.h:
	* COObjectContext.m:
	(-lastSnapshotVersionOfObjectWithURL:): Moved code into new method 
	-lastSnapshotVersionOfObjectWithURL:forVersion: and modified to now call 
	this new method.
	(-lastSnapshotVersionOfObjectWithURL:forVersion:): Added.
	(-lastSnapshotVersionOfObject:forVersion:): Modified to now call 
	-lastSnapshotVersionOfObjectWithURL:forVersion:.

2008-09-30 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COObjectContext.h:
	* COObjectContext.m (-objectForUUID:): Modularized into several new methods 
	-objectWithUUID:, -objectWithUUID:version:, -objectWithURL:version.

2008-09-30 Quentin Mathe <qmathe@club-internet.fr>

	More work on faulting. Faulting is now working but is not used yet.
	* Headers/COGroup.h:
	* COGroup.m:
	(-resolveFaults): Fixed by modifying it to match the doc and the new test 
	method.
	(-setHasFaults,-serialize:using:): Added.
	(-members, -groups, -mergeObjectsWithObjectsOfGroup:policy:, 
	replaceObject:byObject:isTemporalMerge:error:): Modified to call 
	-resolveFaults.
	* TestGroup.m (-testResolveFaults): Added.
	* COObjectContext.m (-resolvedObjectForFault:): Fixed, the current code 
	was a rough draft.
	(-objectForUUID:, objectByRollingbackObject:toVersion:mergeImmediately:): 
	Modified to mark deserialized objects as having faults.
	* TestObjectContext.m (-testResolvedObjectForFault): Added.

2008-09-29 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COObjectContext.h:
	* COObjectContext.m (-lastSnapshotVersionOfObjectWithURL:, 
	-objectForUUID:): Added.
	* TestObjectContext.m (-testLastSnapshotVersionOfObjectWithURL, 
	-testObjectForUUID:): Added.

2008-09-27 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COMetadataServer.h:
	* COMetadataServer.m: 
	(+objectVersionForUUID:): Added.
	* TestMetadataServer.m: Updated.

2008-09-27 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COObjectContext.h:
	* COObjectContext.m: 
	(+defaultContext:): Removed.
	(+currentContext:, +setCurrentContext:, +initialize): Added.
	* TestObjectContext.m: Updated.

2008-09-26 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COObjectServer.h:
	* COObjectServer.m: 
	Documented several methods and...
	(-metadataServer): Added.
	(-objectForUUID: -managedObjectForURL:): Implemented.
	* TestObjectServer.m: Added.

2008-09-25 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COObjectContext.h:
	* COObjectContext.m: 
	(-initWithUUID:): Added new designated initializer.
	(-setSnapshotTimeInterval:, -latestVersion): Added.
	(-init): Moved code into -initWithUUID: and modified to call this last 
	method.
	* TestObjectContext.m (-testLatestVersion): Added.

2008-09-25 Quentin Mathe <qmathe@club-internet.fr>

	* COMetadataServer.m (-queryResultObjectWithPGResult:): Enhanced to support 
	returning NSNumber objects and not just NSString.
	* TestMetadataServer.m (-testDBQuery): Added.

2008-09-24 Quentin Mathe <qmathe@club-internet.fr>

	* COObject.m:
	(-valueForProperty:): Modified to look for the property/value pair in 
	the inherited properties in addition to the data model. Documented.
	(-valueForKey:): Documented.
	* TestObject.m (-testKVC): Added.

2008-09-24 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COObject.h:
	* COObject.m:
	Removed kCOTagProperty, because tags will be implemented in term of groups.

2008-09-23 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COObjectContext.h:
	* COObjectContext.m:
	New notification named COObjectContextDidMergeObjectsNotification and the 
	related userInfo key COMergedObjectsKey.
	(-setDelegate, -delegate): Added.
	(-rollbackToVersion:): Modified to collect merged objects.
	(-[NSObject objectContextDidMergeObjects:]): Added.

2008-09-21 Quentin Mathe <qmathe@club-internet.fr>

	Implemented navigation in the history of object contexts with the new 
	method -rollbackToVersion:. History can now be navigated either per object 
	or per context; the object context plays the role of a pool of objects.
	* Headers/COMetadataServer.h:
	* COMetadataServer.m:
	(-executeRawPGSQLQuery:): Added as a low-level API for 
	-[COObjectContext rollbackToVersion:].
	* Headers/COObjectContext.h:
	* COObjectContext.m:
	Various documentation update. New ivar _revertingContext.
	(-rollbackToVersion:, -isRevertingContext): Added.
	(-undo, -redo): Added skeleton methods.
	* TestObjectContext.m 
	(-testOneStepContextRollback, -testMultiStepContextRollback): Added.

2008-09-17 Quentin Mathe <qmathe@club-internet.fr>

	Renamed methods -addObject:, -removeObject:, -objects in CODirectory, to 
	comply with latest changes done to COGroup protocol.
	* Headers/CODirectory.h:
	* CODirectory.m:
	(-addObject:): Renamed to -addMember:.
	(-removeObject:): Renamed -removeMember:.
	(-objects): Renamed -members.
	Kept these old methods as deprecated until all the code is updated.

2008-09-17 Quentin Mathe <qmathe@club-internet.fr>

	Renamed methods -addObject:, -removeObject:, -objects of COGroup protocol 
	and class to eliminate conflicts with Foundation collections that don't 
	return a boolean. This also solves the overlapping with ETCollection.
	* Headers/COCoreObjectProtocol.h:
	* Headers/COGroup.h:
	* COGroup.m:
	(-addObject:): Renamed to -addMember:.
	(-removeObject:): Renamed -removeMember:.
	(-objects): Renamed -members.
	Updated documentation and kept these old methods as deprecated until all the 
	code is updated.
	* TestGroup.m: Updated.

2008-09-16 Quentin Mathe <qmathe@club-internet.fr>

	* COMetadataServer.m (+defaultDBName): Fixed to use an underscore rather 
	than a dash in the DB name, otherwise an SQL error arises.

2008-09-15 Quentin Mathe <qmathe@club-internet.fr>

	Added custom merging policies for children of groups/relationships when 
	old versions are rolled back. Four merge policies exist for COGroup children:
	old children (default), existing children, union and intersection. Until 
	now, 'old children' was the merge policy applied in all cases.
	These merge policies can also be used to combine two groups into a single 
	one when they aren't temporal instances of each other.
	* Headers/COObjectContext.h:
	* COObjectContext.m:
	Added COChildrenMergePolicy enum and _mergePolicy ivar with related 
	accessors.
	(-init): Updated for initiazing _mergePolicy ivar.
	(-replaceObject:byObject:collectAllErrors:): Modified to call 
	-mergeObjectsWithObjectsOfGroup:policy on temporalInstance if it's a group.
	* Headers/COGroup.h:
	* COGroup.m:
	(-mergeObjectsWithObjectsOfGroup:policy: -mergeArray:intoArray:policy:): 
	Added.
	* TestObjectContext.m (-testOldChildrenMergePolicy, 
	-testExistingChildrenMergePolicy, -testChildrenUnionMergePolicy,
	-testChildrenIntersectionMergePolicy): Added.
	(-initForTest, -releaseForTest): Added to ensure we enable COGroup 
	persistency for each test we run.

2008-09-13 Quentin Mathe <qmathe@club-internet.fr>

	Modified COSerializer and CODeserializer to rely on latest modifications 
	in EtoileSerialize. Removed a large chunk of CODeserializer code that is 
	now handled by EtoileSerialize, CODeserializer now only patches 
	-[ETDeserializer lookUpObjectForUUID:] instead of -loadUUID:withName:. 
	Wrote several new basic serialization related tests.
	Added a basic in-memory cache logic for managed objects in COObjectServer. 
	Modified COObjectContext and CODeserializer to use it on 
	-lookUpObjectForUUID:. Added preliminary faulting support to COGroup for 
	lazily resolving UUIDs into managed objects. This will eliminate the load of 
	the whole of core object graph the first time a managed object is 
	deserialized.
	Made transient the backward relationship from objects to parent groups, but 
	this will need more adjustements to work well.
	* COObjectServer.h:
	* Source/COObjectServer.m:
	(-cacheObject:, -removeCachedObject: -cachedObjectForUUID:): Added. These 
	methods provides the basic cache to track core objects loaded in memory.
	* COObject.h:
	* Source/COObject.m:
	(-serialize:using:): Made kCOParentsProperty transient.
	(-isCoreObject, -isManagedCoreObject): Added. We should conform to 
	COManagedObject protocol, but in the meantime we just implement these.
	* COSerializer.m (-storeObjectFromAddress:withName:): Tweaked a bit logging 
	and return.
	* CODeserializer.m:
	(-loadUUID:withName:, addressForIVarName()): Removed. Done by moving the 
	basic logic of -loadUUID:withName: into EtoileSerialize where it should be.
	(-lookUpObjectForUUID:) Added. This method patches the basic one
	implemented by ETDeserializer 
	* TestSerializer.m 
	Added managedObject ivar to SubBasicObject class. Added visual output for 
	serialization and various methods to test UUID serialization/deserialization.
	(-visualBackendClass, -visualSerialize, 
	-testInvocationWithUUID, 
	-testBasicObjectWithManagedObjectIVarSerialization): Added.
	* COGroup.h:
	* COGroup.m:
	New ivar _hasFaults.
	(-hasFaults:, -resolveFaults, -_replaceFaultObject:inArray:withObject:): 
	Added.
	* COObjectContext.h:
	* Source/COObjectContext.m:
	(-objectServer, -resolveObjectForFault:): Added.
	(-registerObject:, -unregisterObject:): Updated to add and remove managed 
	objects in the cache of the object server.

2008-09-10 Quentin Mathe <qmathe@club-internet.fr>

	First part of the merge support. This allows temporal instances to replace 
	existing instances in the object context without breaking group 
	relationships. Temporal instances which are groups, aren't yet properly 
	merged.
	* COObjectContext.h:
	* COObjectContext.m:
	New enum COMergeResult.
	(-lastMergeErrors): Added.
	(-objectByRollingbackObject:toVersion:mergeImmediately:): Added an extra 
	mergeNow parameter. Implemented most of the merge logic that belongs to 
	COObjectContext, the rest is in COGroup.
	* COGroup.h:
	* COGroup.m:
	(-containsTemporalInstance:, 
	-replaceObject:byObject:isTemporalMerge:error:): Added.
	* TestObjectContext.m (-objectByRollingbackObject:toVersion:, -testMerge): 
	Added.

2008-09-08 Quentin Mathe <qmathe@club-internet.fr>

	* COObject.m (-_readObjectVersion1:, -propertyList):
	* COGroup.m (-_readGroupVersion1:, -propertyList):
	* COPropertyListFormat.m (-_readObjectVersion1, -_readGroupVersion1:, 
	-_ouputObjectVersion1, -_outputGroupVersion1:):
	Moved property list format related methods and variables in a standalone 
	file made of categories on COObject and COGroup. Updated -propertyList 
	methods to now call new extracted methods -_outputObjectVersion1 and 
    -_outputGroupVersion1 which are symetric to reading methods.

2008-09-08 Quentin Mathe <qmathe@club-internet.fr>

	Some adjustements in the overall architecture to better shift the 
	responsabilities between the core classes. Modified COMetadataServer and
	COObjectContext to store the histories of object contexts into the metadata 
	DB. Worked out a better handling of equality vs temporality for managed core 
	objects.
	* COMetadataServer.m (-setUpDBWithURL): Modified the schema of History table 
	a bit.
	* Headers/COSerializer.h:
	* COSerializer.m: 
	Modified the parameters of defaultCoreObjectXXXSerializerForObject: methods 
	to rather take an URL and an object version in parameters, and thereby not 
	depend on the presence of an object context.
	* COObjectContext.m:
	Documented several methods.
	(-registerObject:): Modified to raise an exception if the object already 
	belongs to another context.
	(-UUID, -version): Added.
	(-lastVersionOfObject:): Fixed to use the right URL where deltas are located.
	(-logInvocation:recordVersion:timestamp:):Implemented. Also added a 
	timestamp: parameter to this method, so we can pass a consistent timestamp 
	during an invocation record.
	* Headers/COObject.h:
	* COObject.m:
	(-isEqual:): Modified to take in account the object version.
	(-isTemporalInstance:, -setObjectContext:): Added.
	(-init): Modified to use a callback on -setObjectContext: from 
	COObjectContext rather than setting _objectContext ivar directly. This 
	allows to change the context of an object easily at a later point.
	(automaticallyMakeNewInstancesPersistent): Modified to be a per class 
	property rather than a global one.
	(-finishedDeserializing): Reset _objectVersion to -1. This fixes the unit 
	test in TestDeserializer.m at line 205.
	* TestObjectContext.m: Many modifications. Added a test method for 
	-lastVersionOfObject:.

2008-09-06 Quentin Mathe <qmathe@club-internet.fr>

	Improved to store object infos attached to each UUID/URL pair in the 
	metadata DB.
	* Headers/COMetadataServer.h:
	* COMetadataServer.m:
	New ivar _fm.
	(-setURL:forUUID:): Moved code into the next method.
	(-setURL:forUUID:withObjectVersion:type:isGroup:timestamp:): New method.
	(-updateUUID:toObjectVersion:timestamp:): New method.
	* COObjectContext.m (-updateMetadatasForObject:recordVersion:): Improved 
	to pass more infos to the metadata server and update object infos with 
	an SQL update rather than a raw SQL delete/insert.

2008-09-05 Quentin Mathe <qmathe@club-internet.fr>

	Modified COObjectContext to leverage the metadata server. COMetadataServer 
	is now used to retrieve the URL bound to each object UUID, and also insert 
	an UUID/URL pair on the first serialization of an object.
	* COObject.m (-lastObjectVersion): Implemented.
	* Headers/COObjectContext.h:
	* COObjectContext.m:
	(-metadataServer, -lastVersionOfObject:, 
	-updateMetadatasForObject:recordVersion:, 
	-serializationURLForObject:, -setSerializationURL:forObject:): New methods.
	(-recordInvocation:, -snapshotObject:): Updated to call 
	-updateMetadatasForObject:recordVersion:.
	* Headers/COSerializer.h:
	* COSerializer.m:
	Updated all methods that return serializers, to initialize them with the URL 
	provided by the object context of the object passed in parameter, instead of 
	using +serializationURLForObject:.
	(-defaultLibraryURL): Modified to return an absolute path.
	(-store, -URL): New methods.
	(-[ETSerialObjectBundle URL]): New category.
	* TestSerializer.m (-libraryURLForTest): Corrected to return an absolute 
	path.

2008-09-03 Quentin Mathe <qmathe@club-internet.fr>

	Made all tests pass.
	* COFile.m (-exists):
	* TestFile.m:
	Fixed a broken unit test for COFile.
	* TestObject.m: Worked around a NSValue comparison issue on GNUstep.
	* TestObjectContext.m: Disabled the last tests in -testGroupPersistency, 
	they need upcoming stuff to work. Added some additional unit tests for 
	-objectVersion.

2008-08-27 Quentin Mathe <qmathe@club-internet.fr>

	Major rewrite of the Metadata server to use PostgreSQL for the Metadata DB
	instead of a dumb dictionary. This code isn't yet plugged into the rest of 
	CoreObject and the DB schema will surely evolve.
	Note: To run the test suite, you must first run setup-coreobject.sh script.
	* Headers/COMetadataServer.h:
	* COMetadataServer.m:
	* TestMetadataServer.m:
	Rewritten. Removed CORefRecord class.
	* GNUmakefile: Updated.
	* setup-coreobject.sh: Added.

2008-08-14 Quentin Mathe <qmathe@club-internet.fr>

	Implemented managed core object graph serialization and deserialization by 
	treating each managed core object as a distinct persistent root.
	* Headers/NSObject+CoreObject.h:
	* NSObject+CoreObject.m:
	(-[ETUUID isFault]): New method.
	* COSerializer.m (-storeObjectFromAddress:withName:): 
	* CODeserializer.m (-loadUUID:withName:):
	New methods that patch ETSerializer and ETDeserializer, to be moved back 
	into EtoileSerialize once stabilised.
	(+[ETSerializer defaultLibraryURL]): Modified to provide a hook for a 
	testing specific library URL.
	* TestSerializer.m 
	(+[ETSerializer libraryURLForTest]): New method to put persistent objects 
	created by tests outside of the main CoreObject library.
	(-testBasicManagedCoreObjectGraphSerialization): New method to test managed 
	core object graph persistency.
	* GNUmakefile: Modified to define UKTEST for test bundle target.

2008-08-06 Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COUtility.h: Modified RECORD macro to bypass persistency if 
	temporarily disabled.
	* Headers/COObject.h:
	* COObject.m:
	New ivar _isPersistencyEnabled.
	(-init): Tweaked to currently non-persistent objects by default and register 
	the receiver in the object context only if persistency has been turned on.
	(-enablePersistency, -disablePersistency): Added.
	(-serialize:using:, -deserialize:fromPointer:version:): Modified so 
	_isPersistencyEnabled doesn't get serialized.
	(-managedMethodNames): Added.
	* Headers/COGroup.h:
	* COGroup.m:
	(-managedMethodNames): Added.
	(-init):  Updated to disable persistency during initialization.
	* COFileObject.m (-initWithPath:): Updated to disable persistency during 
	initialization.
	* TestObjectContext.m: Added a bunch of tests for group persistency.
	(+[SubObject initialize]): Corrected to match recent changes in the way
	to declare the data model (see +[COObject initialize]).

2008-08-06 Quentin Mathe <qmathe@club-internet.fr>

	Don't serialize cached file manager for the following classes...
	* COFileObject.m:
	* COCollection.m:
	(-serialize:using:, -deserialize:fromPointer:version:): Added.

2008-08-04 Quentin Mathe <qmathe@club-internet.fr>

	Finished to clean up and test basic features of COObjectContext (object 
	space/plane-like persistency to be shared by CoreObject data model and 
	COProxy). This code extracted and modularized from COProxy now works as 
	expected. COGroup persistency and advanced features like replacing an object 
	by another temporal instance in a CoreObject graph aren't implemented yet.
	WARNING: Unstable API, do not use.
	* Headers/COObject.h:
	* COObject.m:
	New ivar _objectVersion.
	(+automaticallyMakeNewInstancesPersistent, 
	+setAutomaticallyMakeNewInstancesPersistent:, 
	-objectContext, 
	-objectVersion, -_setObjectVersion:, -lastObjectVersion, -isPersistent, 
	-save, 
	-UUID, 
	-serializerDidFinish:forVersion:, -deserializerDidFinish:forVersion:): 
	New methods.
	(-serialize:using:): Modified to ignore _objectVersion.
	(-uniqueID): Deprecated.
	* Headers/COSerializer.h:
	* COSerializer.m:
	(+defaultBackendClass, +defaultCoreObjectDeltaSerializerForObject:, 
	+defaultCoreObjectFullSaveSerializerForObject:, +serializationURLForObject:,
	+serializerWithBackend:objectVersion:forURL:, +serializeObject:toURL:, 
	-version): New ETSerializer category methods.
	* Headers/CODeserializer.h:
	* CODeserializer.m:
	(+defaultCoreObjectDeserializer, +deserializerObjectWithURL:): 
	New ETDeserializer category methods.
	* Headers/COObjectContext.h:
	* COObjectContext.m:
	(-snapshotSerializerForObject:, -deltaSerializerForObject:): 
	Modified to return ready-to-use serializers set up by 
	ETSerializer(COSerializer). 
	(-lastSnapshotOfObject:forVersion:snapshotVersion:): Fixed to really 
	deserialize the last snapshot before the given version and not just the 
	last snapshot. Also modified to update the object version of the returned 
	instance.
	(-playbackInvocations:fromVersion:toVersion:): Modified to update the object 
	version of the returned instance.
	(-recordInvocation:): Modified to return the object version incremented or 
	not on return, this allows to know whether the invocation was recorded or 
	not. Fixed to return at the right time when an invocation doesn't have to 
	be recorded (record stack not empty). Added a check to be sure the target 
	belongs to the context.
	(-serializeInvocation:): Modified to handle object versions. Fixed to 
	correctly increment and retrieve the version bound to the delta serializer. 
	Added code to take a BaseVersion snapshot on first invocation record. Added 
	some assertion checks.
	(-logInvocation:recordVersion:): Modified to increment the context version.
	(-snapshotObject:shouldIncremementObjectVersion:): New method.
	(-snapshotObject:): Moved code into the previous method.
	* Headers/COUtility.h: Modified the macros to record invocations of managed 
	methods.
	* TestSerializer.m:
	* TestObjectContext.m: 
	Added.
	* Source/COObjectServer.m:
	* Source/COGroup.m (+objectWithURL:):
	* Source/CODirectory.m (+objectWithURL:):
	Fixed warnings in COObjectServer by declaring +objectWithURL in COGroup 
	protocol.

2008-05-25 Quentin Mathe <qmathe@club-internet.fr>

	Improved the filesystem backend to work as expected with EtoileUI, mainly by
	cleanly exporting metadatas as properties, supporting to test whether a URL 
	references a group or not, and properly turning pick and drop operations 
	into filesystem operations through ETCollectionMutation.
	* Headers/COGroup.h:
	* COGroup.m:
	Modified COGroup protocol to conform to ETCollectionMutation.
	(-insertObject:atIndex:): New method (to be conform to ETCollectionMutation).
	(-isOrdered): Modified to return NO (may change later).
	(+isGroupAtURL:): New method (protocol and class).
	* Headers/CODirectory.h:
	* CODirectory.m:
	(+isGroupAtURL:): New method.
	(-exists): Moved existing code into +isGroupAtURL: and modified to call it.
	* COFile.m:
	(-metadatas): Fixed to include URL, name, displayName and icon in metadatas.
	(-valueForProperty:): Improved to only look up in superclass the properties 
	not declared in metadatas.
	(-properties): Fixed to expose metadatas as properties.
	(-setURL:): Improved to raise an exception if the URL doesn't reference a 
	file.

2008-05-20 Quentin Mathe <qmathe@club-internet.fr>

	Improved COObject protocol and made COObject and COGroup classes conform to
	their associated protocols. Fixed various compiler warnings by taking care
	of that.
	* GNUmakefile: Disabled serialization tests temporarily.
	* Headers/COObject.h:
	* COObject.m:
	Added -uniqueID to COObject protocol and modified COObject class to conform 
	to the former protocol. Also made COObject protocol inherits from NSObject 
	and NSCopying protocol.
	(-properties, -metadatas, -isCopyPromise): Added for COObject protocol 
	conformance.
	(-hash, -isEqual:): Fixed type declarations to match NSObject API.
	* Headers/COGroup.h:
	* COGroup.m:
	Modified COGroup class to conform to COGroup protocol.
	(-isGroup:, -isOpaque:, -addGroup, -removeGroup, -groups): Added for COGroup 
	protocol conformance.
	(-isOrdered, -isEmpty, -content, -contentArray): Added for ETCollection 
	protocol conformance.
	(-propertyList): Added a cast to <COObject> to get rid of a warning 
	about conflicting return types with -[NSEvent uniqueID].
	* Headers/COFile.h:
	* COFile.m:
	(-uniqueID): Added.
	(-hash, -copyWithZone:): Fixed type declarations to match NSObject and 
	NSCopying API.

2008-05-20 Quentin Mathe <qmathe@club-internet.fr>

	* COObject.m (-serialize:using:, -deserialize:fromPointer:version:): New 
	methods to handle the serialization of managed core objects (ETSerializable 
	informal protocol).

2008-04-27 Quentin Mathe <qmathe@club-internet.fr>

	Added a partially implemented object server that plays the roles of a 
	convenient core object factory and a shared cache of all core objects in 
	memory for all related core object contexts.
	* Headers/COObjectServer.h:
	* COObjectServer.m:
	Added.
	* GNUmakefile: Updated.

2008-04-27 Quentin Mathe <qmathe@club-internet.fr>

	Added a rudimentary metadata server only taking care of mapping UUIDs to 
	URLs with a simple dictionary for now.
	* Headers/COMetadataServer.h:
	* COMetadataServer.m:
	* TestMetadataServer.m:
	Added.
	* GNUmakefile: Updated.

2008-04-22 Quentin Mathe <qmathe@club-internet.fr>

	Written some basic serialization tests and ensured COObjectContext doesn't 
	break the existing code. All tests pass but one (NSNumber issue, may be 
	GNUstep-related).
	* COObjectContext.m:
	(+defaultContext): Fixed the incorrect release of the default context that 
	lead to a crash.
	(-recordInvocation:): Tweaked to always push objects on the recorded objects 
	stack and documented. This fix a crash occuring in -endRecord trying to 
	remove an object which isn't present.
	(-snapshotTimeInterval): Corrected to return the ivar value.
	* Headers/NSObject+CoreObject.h: Declared -version in COManagedObject 
	protocol.
	* Headers/COObject.h:
	* COObject.m:
	(-version:): New method with associated property kCOVersionProperty (fix a
	missing selector exception in COObjectContext).
	(+initialize, -init): Updated to declare kCOVersionProperty.
	* TestObject.m: Updated to test kCOVersionProperty.
	* TestSerializer.m: More tests.
	* GNUmakefile: Turned on all tests by default.

2008-04-19  Quentin Mathe <qmathe@club-internet.fr>

	Introduced COOObjectContext to manage pools of managed core objects 
	(COObject and COProxy). First step towards the modularization of COProxy to 
	share all its code with the adaptative model (COObject and related 
	subclasses).
	WARNING: Work in progress code, mostly untested but compiles fine.
	* Headers/COObjectContext.h:
	* COObjectContext.m:
	Added.
	* Headers/COUtility.h: Added various new macros to handle the recording of 
	invocations.
	* Headers/COObject.h: Added _objectContext ivar.
	* COObject.m:
	(-init): Modified to initialize _objectContext ivar.
	(-objectContext):
	(-relatedCoreObjects):
	(-loadRelatedCoreObjects):
	(-storeRelatedCoreObjects):
	New methods (latest three to deal with core object faults).
	(-setValue:forProperty:):
	(-valueForProperty:):
	Modified to use the new recording macros (several other methods will have to 
	be modified).
	* Headers/NSObject+CoreObject.h: Extended COManagedObject protocol to 
	exploit the new managed object context (API needs work). Modified -UUID 
	return type to be an ETUUID value object instead of an NSString.
	* NSObject+CoreObject.m: Minor import change to compile.
	* Headers/COSerializer.h:
	* Headers/CODeserializer.h:
	* COSerializer.m:
	* CODeserializer.m:
	Rewritten to be useful in a different way now that most of their old logic 
	has been moved to EtoileSerialize. Now encapsulates the interaction details 
	with EtoileSerialize.
	* Headers/CoreObject.h: Renenabled serializer classes.
	* GNUmakefile: Updated.

2008-04-15  Quentin Mathe <qmathe@club-internet.fr>

	* Headers/NSObject+CoreObject.h:
	* Headers/COProxy.h:
	* NSObject+CoreObject.m:
	* COProxy.m:
	(-isCoreObjectProxy): Added.

2008-04-15  Quentin Mathe <qmathe@club-internet.fr>

	Fixed compilation with EtoileSerialize trunk version.
	* Headers/CoreObject.h:
	* GNUmakefile: 
	Disabled COSerializer and CODeserializer which aren't needed immediately 
	because EtoileSerialize now provides most of their features in their parent 
	classes.

2008-04-15  Quentin Mathe <qmathe@club-internet.fr>

	WARNING: Doesn't compile with the trunk version of EtoileSerialize.
	* Headers/COProxy.h:
	* COProxy.m:
	Added by copying them from EtoileSerialize.

2008-04-07  Quentin Mathe <qmathe@club-internet.fr>

	Removed existing UUID stuff from CoreObject in favor of the support now 
	offered by EtoileFoundation.
	WARNING: May not compile with the trunk version of EtoileSerialize.
	* UUID:
	* Headers/COUUID.h:
	* COUUID.m:
	Removed. We use ETUUID instead now.
	* Headers/CoreObject.h:
	* Headers/COObject.h:
	* Headers/COSerializer.h:
	* Headers/CODeserializer.h:
	* Source/COObject.m:
	* Source/COSerializer.m:
	* Source/CODeserializer.m:
	* GNUmakefile: 
	Updated.

2008-03-31  Quentin Mathe <qmathe@club-internet.fr>

	* Headers/COGroup.h: Fixed COGroup protocol to inherit from COObject as 
	expected.

2008-03-21  Quentin Mathe <qmathe@club-internet.fr>

	Wrote tests that ensure file copy operation behaves correctly.
	* TestDirectory.m (-testCopyObject): Added.

2008-03-21  Quentin Mathe <qmathe@club-internet.fr>

	Fixed file move operation and probably copy too (have to write tests to 
	ensure copy works as advertised).
	* COFile.m:.
	Fixed -URL to return an autoreleased copy as expected for such value object.
	* CODirectory.m
	(-addObject:, -addSymbolicLink:, -addHardLink:, 
	-checkObjectToBeRemovedOrDeleted:): Corrected object validity boolean test.
	(-addCopiedObject, -addMovedObject:): Fixed destination path to match 
	NSFileManager expectation.
	* TestFile.m:
	* TestDirectory.m:
	Added new tests.

2008-03-20  Quentin Mathe <qmathe@club-internet.fr>

	Introduced a preliminary CoreObject protocol and a filesystem backend that
	implements it.
	* Headers/COObject.h:
	* Headers/COGroup.h:
	Added a rough CoreObject protocol that consists of COObject and COGroup
	protocols. COObject and COGroup classes don't yet conform to these.
	* Headers/COFile.h:
	* COFile.m:.
	* Headers/CODirectory.h:
	* CODirectory.m:.
	Added. These classes makes up the FS server backend that will be later moved 
	out of the framework into a standalone bundle.
	* TestFile.m:
	* TestDirectory.m:
	Added.
	* GNUmakefile:
	* Headers/CoreObject.h: 
	Updated.
