a guid is a 128bit numbercharacter(36) is 288. even if you skip the '-' chars you're still at 256. and if characters() is unicode ... using a too large field for indexing, especially for PK, might not be such a good idea. is there any kind of a binary[128] field you can use instead? then we'll discuss the mapping
2009/7/1 Kenneth Siewers Møller <kenn...@siewers.dk> > Hi > > This might be a simple question to answer, but here goes. > > We're running a PostgreSQL 8.1 DBMS, which doesn't support UUID. My idea is > therefore to continue using GUID's as PK's in my domain model, but simply > persist them as character(36) in the database. Is this possible? I've tried > just changing the column to character(36), but this causes NH to produce the > error "operator does not exist: character = uuid", which is resonable... > Changing the mapping to type "string" creates a conversion exception - again > quite understandable... > > I'd rather avoid creating a custom usertype as the DBMS probably will be > upgraded at some point, making this a somewhat irellevant implementation... > > Any ideas? > > > > -- Ken Egozi. http://www.kenegozi.com/blog http://www.delver.com http://www.musicglue.com http://www.castleproject.org http://www.gotfriends.co.il --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---