Here is the Log4Net output for the test I am running
Quote:
2008-08-01 11:54:04,328 DEBUG opened session at timestamp: 633531884443
2008-08-01 11:54:04,343 DEBUG Begin (Unspecified)
2008-08-01 11:54:04,343 DEBUG Obtaining IDbConnection from Driver
2008-08-01 11:54:04,468 DEBUG saving transient instance
2008-08-01 11:54:04,468 DEBUG generated identifier: 62d96510-55a4-44c0-98be-9aeb00c4205d, using strategy: NHibernate.Id.GuidCombGenerator
2008-08-01 11:54:04,468 DEBUG saving [TaskManager.DataTransfer.Task#62d96510-55a4-44c0-98be-9aeb00c4205d]
2008-08-01 11:54:04,484 DEBUG unsaved-value: 0
2008-08-01 11:54:04,484 DEBUG Seeding: 1
2008-08-01 11:54:04,484 DEBUG flushing session
2008-08-01 11:54:04,484 DEBUG processing flush-time cascades
2008-08-01 11:54:04,500 DEBUG dirty checking collections
2008-08-01 11:54:04,500 DEBUG Flushing entities and processing referenced collections
2008-08-01 11:54:04,500 DEBUG Processing unreferenced collections
2008-08-01 11:54:04,500 DEBUG Scheduling collection removes/(re)creates/updates
2008-08-01 11:54:04,500 DEBUG Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
2008-08-01 11:54:04,500 DEBUG Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
2008-08-01 11:54:04,515 DEBUG listing entities:
2008-08-01 11:54:04,515 DEBUG TaskManager.DataTransfer.Task{Version=1, TaskRef=1.0, Name=Oracle Task, Description=Oracle Task Description, TaskId=62d96510-55a4-44c0-98be-9aeb00c4205d}
2008-08-01 11:54:04,515 DEBUG executing flush
2008-08-01 11:54:04,515 DEBUG registering flush begin
2008-08-01 11:54:04,515 DEBUG Inserting entity: [TaskManager.DataTransfer.Task#62d96510-55a4-44c0-98be-9aeb00c4205d]
2008-08-01 11:54:04,515 DEBUG Version: 1
2008-08-01 11:54:04,531 DEBUG Opened new IDbCommand, open IDbCommands: 1
2008-08-01 11:54:04,531 DEBUG Building an IDbCommand object for the SqlString: INSERT INTO tasks_Task (Version, TaskRef, Name, Description, TaskId) VALUES (?, ?, ?, ?, ?)
2008-08-01 11:54:04,531 DEBUG Dehydrating entity: [TaskManager.DataTransfer.Task#62d96510-55a4-44c0-98be-9aeb00c4205d]
2008-08-01 11:54:04,531 DEBUG binding '1' to parameter: 0
2008-08-01 11:54:04,531 DEBUG binding '1.0' to parameter: 1
2008-08-01 11:54:04,531 DEBUG binding 'Oracle Task' to parameter: 2
2008-08-01 11:54:04,531 DEBUG binding 'Oracle Task Description' to parameter: 3
2008-08-01 11:54:04,531 DEBUG binding '62d96510-55a4-44c0-98be-9aeb00c4205d' to parameter: 4
2008-08-01 11:54:04,546 DEBUG INSERT INTO tasks_Task (Version, TaskRef, Name, Description, TaskId) VALUES (:p0, :p1, :p2, :p3, :p4); :p0 = '1', :p1 = '1.0', :p2 = 'Oracle Task', :p3 = 'Oracle Task Description', :p4 = '62d96510-55a4-44c0-98be-9aeb00c4205d'
2008-08-01 11:54:04,546 DEBUG Enlist Command
2008-08-01 11:54:04,656 DEBUG Closed IDbCommand, open IDbCommands: 0
2008-08-01 11:54:04,656 DEBUG registering flush end
2008-08-01 11:54:04,656 DEBUG IDbTransaction disposed.
2008-08-01 11:54:04,656 DEBUG transaction completion
2008-08-01 11:54:04,656 DEBUG aggressively releasing database connection
2008-08-01 11:54:04,671 DEBUG Closing connection
2008-08-01 11:54:04,687 DEBUG running ISession.Dispose()
2008-08-01 11:54:04,687 DEBUG closing session
2008-08-01 11:54:04,687 DEBUG running BatcherImpl.Dispose(true)
The thing that is concerning me is this
Code:
INSERT INTO tasks_Task (Version, TaskRef, Name, Description, TaskId) VALUES (:p0, :p1, :p2, :p3, :p4); :p0 = '1', :p1 = '1.0', :p2 = 'Oracle Task', :p3 = 'Oracle Task Description', :p4 = '62d96510-55a4-44c0-98be-9aeb00c4205d'
I was under the impression that to successfully pass a .NET Guid to Oracle RAW(16) you had to convert the Guid from
"62d96510-55a4-44c0-98be-9aeb00c4205d" to
"62d9651055a444c098be9aeb00c4205d" by using the following
Write to Oracle: guid.ToString("N")
read from Oracle: new Guid( new SoapHexBinary( (byte[])oracle Guid).ToString() )
If so, wouldn't we have to put this into the GuidType.cs somehow ?
Al