It is just the classic "change db schema - require recreation of db" problem. 
We were using a manual db version number butit kept getting deleted.  I've solved it by 
storing a string in the db made by combining the names of the domain objects and the 
names and types of their properties. That pretty much defines the schema and there is no 
risk of collision like with a crc or hash. Our domain model is pretty small so the string 
is not huge.

On 19/06/2012 9:07 p.m., Nic Wise wrote:
What are you trying to do with it?

I usually just use Guid.NewGuid() ?

Could you just go with the version of the app? if "database version"
!= "app version" - upgrade.

?

On Tue, Jun 19, 2012 at 5:39 AM, Felix Collins<fe...@intranel.com>  wrote:

Type.GUID seems  to return guid.empty on Monotouch.

I found this...
http://mono.1490590.n4.nabble.com/Mono-dev-Type-GUID-patch-td1519628.html


I just want a way to store a hash of our ORM schema to check whether the
database need to be updated. Does anyone have any bright ideas how to do
this.  Otherwise I'll walk the types and their properties and do a CRC or
digest on the string...

Cheers,
Felix
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch


_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to