NEventStore / NEventStore.Persistence.MongoDB

Mongo Persistence Engine for NEventStore
MIT License
22 stars 26 forks source link

CheckpointNumber is a string but being converted to int #9

Closed tonyeung closed 10 years ago

tonyeung commented 10 years ago

in this line:

return max != null ? max[MongoCommitFields.CheckpointNumber].AsInt64 : 0L;

i have _id as the value instead of a numeric, is this because the data structure has been updated since the version I have of NEventStore?

I'm getting this error during the wireup -

An exception of type 'System.InvalidCastException' occurred in AMS.AccessControl.CommandProcessor.dll but was not handled in user code

Additional information: Unable to cast object of type 'MongoDB.Bson.BsonDocument' to type 'MongoDB.Bson.BsonInt64'.
andreabalducci commented 10 years ago

Checkpoint is exposed with a typed class: LongCheckpoint. On mongodriver is persisted as int64.

On previous versions of NEventStore was a composed key. You should migrate the data between the schemas. @damianh there's a migration tool from previous versions?

tonyeung commented 10 years ago

a migration is cool, but thankfully we haven't gone production yet, and the data we have can easily be regen. Might want to post the tool if it exists here for posterity's sake though. I just need to delete my database and let neventstore create a new one right?

tonyeung commented 10 years ago

Yep, my tests pass when i drop my old eventstore.

andreabalducci commented 10 years ago

should be this one https://github.com/NEventStore/NEventStore.Migrations