Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. NHibernate

NHibernate

Scheduled Pinned Locked Moved C#
helpcsharpc++javaxml
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Puneet Bhatnagar
    wrote on last edited by
    #1

    Hi I am using nHibeernate version 1.0.4., which I took from SourceForge.Net with the configuration settings given in the site itself. I am getting the follwing error in Mapping a file. Error Could not find a getter for property 'UN' in class 'Address.Info' A first chance exception of type 'System.NullReferenceException' occurred in Address.exe Please find below my code files: PLease replace &lt; with '<' and &gt; with '>'. class Info { private int id; private string UN; private string PN; } My mapping File with name Info.hbm.xml: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name ="Address.Info, Address" table ="Info"> <id name ="Id" column="LoginID" type ="Int32" unsaved-value ="0"> <generator class="native" /> </id> <property name="UN" column="UN" type="String(50)" /> <property name="PN" column="PN" type="String(50)" /> </class> </hibernate-mapping> Could you please tell me what I need to do to reslove this issue?? Thanks in Advance With Regards, Puneet

    P 1 Reply Last reply
    0
    • P Puneet Bhatnagar

      Hi I am using nHibeernate version 1.0.4., which I took from SourceForge.Net with the configuration settings given in the site itself. I am getting the follwing error in Mapping a file. Error Could not find a getter for property 'UN' in class 'Address.Info' A first chance exception of type 'System.NullReferenceException' occurred in Address.exe Please find below my code files: PLease replace &lt; with '<' and &gt; with '>'. class Info { private int id; private string UN; private string PN; } My mapping File with name Info.hbm.xml: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"> <class name ="Address.Info, Address" table ="Info"> <id name ="Id" column="LoginID" type ="Int32" unsaved-value ="0"> <generator class="native" /> </id> <property name="UN" column="UN" type="String(50)" /> <property name="PN" column="PN" type="String(50)" /> </class> </hibernate-mapping> Could you please tell me what I need to do to reslove this issue?? Thanks in Advance With Regards, Puneet

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Well, have you looked around at NHibernate's documentation?

      puneet.bhatnagar123@gmail.com wrote:

      PLease replace < with '<' and > with '>'.

      There is a checkbox at the bottom that says Ignore HTML tags in this message (good for code snippets)

      "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups