Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# gedw99 7/20/2007 1:49 PM
I am working on a web service gateway to Cuyahoga. I


One of the things i am having issues with are the identity constraints at the db level.
The reason is quite complicated but boils down to needed 2 external parties to share data between them ( like peer to peer) and then one can commit the data into their own Cuyahoga instance.

Essentially i think the solution is to allow the middle tier to assign a guid, rather than the DB to do it.
Teh alternative is to do a GetNextSequence ( a bit like how Oracle sequences work), so that instead of a guid it can be the next sequence available. The advanateg being that the GUID take up alot of space in the DB. Either is fine though.
The unique constraint can still be on the DB.


Does anyone know if NHibernate can be smart enough to do this.
The way it needs to work is that if it already has a GUID in the data then it checks if it exists in the DB then:
1. If in DB, then do an update
2. If not in db, do an insert.


Doing this would also make doign oither stuff easier too ( workflows, versioning and sharing data with other systems ) much easy with Cuyahoga, because it will be able to shared out data and then bring it back in from concurrent sources without having to be told if it an insert and update.




G