The mapping file is set up as follows:
(Apologies for bad formatting)
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="PaymentService.Core"
namespace="PaymentService.Core.Domain">
<class name="RegisteredKiosk">
<id name="Id" column="idRegisteredKiosk">
<generator class="guid.comb" />
</id>
<property name="SerialNumber"
type="System.String"
not-null="true" />
<property name="KioskName"
type="System.String"
not-null="true" />
<bag name="Transactions" lazy="true" cascade="all-delete-orphan">
<key column="idTransaction" />
<one-to-many class="KioskTransaction" />
</bag>
</class>
</hibernate-mapping>
I am trying to select a "registeredkiosk" by its ID
(idRegisteredKiosk) which is a GUID.
However, although NHibernate has successfully inserted the
information, in this case the ID: 31E06EE26FB7994392DB9E9B00E13718, if
I try and select this Guid from the table, using NHibernate, 0 rows
are returned. I can manually execute my own query against the table
and see the row is there. My query is the following: SELECT * FROM
RegisteredKiosk WHERE idRegisteredKiosk =
UNHEX('31E06EE26FB7994392DB9E9B00E13718');
I am using NHibernate 3.0.0 on a MySQL Database (using the InnoDB
Engine) I have added "Old Guids=true" to the MySQL connection string
in order to get it to insert (otherwise it would error saying that the
field wasn't long enough)
Any light you could shed on this issue would be appreciated
Dan
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.