This is my first question on StackOverflow!
I am using NHibernate 2 in my vb.net project I also use NHibernate.JetDriver to access a MS Access database
I have a table named tblPeople and it has a field named 'PersonImage' witch it is of the 'attachment' field type
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
namespace="BusinessModel" assembly="NHibernateDemo">
<class name="clsPeople" table="tblPeople">
<id name="ID">
<column name="[ID]" sql-type="int" not-null="true" />
</id>
....
<property name="Image">
<column name="[PersonImage]" sql-type="ntext/nvarchar/varbinary/?????" />
<!--varbinary(max)-->
</property>
</class>
</hibernate-mapping>
Here is the class
Namespace BusinessModel
Public Class clsPeople
Public Overridable Overloads Property ID() As Integer
Public Overridable Overloads Property Image() As [byte()/String/String/**?????**]
End Class
End Namespace
Any Ideas on what data types to choose for the mappings in order to get the actual images from the table ?
Any help in the right direction will make me huppy!
I even tried with a hibernate 3 and Custom Compilled JetDriver but i also whatever i do i keep getting errors Could not cast the value in field column of type String to the Type BinaryBlobType or Byte[] or whatever except if i put String where i get a ; seperated list of filenames but nothing more!