Ektorp - modifying document timestamp on update
===

I have just started using Ektorp to save documents in CouchDb. Each document has two timestamp fields - createdDate and modifiedDate - which are both set by a base class constructor when the document is first created. When the document is updated, I'd like to call the base class modify() method to update the modifiedDate field.

I'm not sure how to do this with Ektorp. All document operations are handled by the CouchDbConnector interface, which is implemented by the StdCouchDbConnector class. I tried extending that class and overriding its update() method so that it calls my base class modify() method. But if I try to cast the CouchDbConnector to my new class as follows, the cast fails.

    (MyCouchDbConnector) dbInstance.createConnector(dbName, true)

Any help would be appreciated.