This project is read-only.

Help with Error!

Topics: Customizing Orchard, Troubleshooting, Writing modules
Jan 12, 2012 at 4:06 PM

I created custom fields in my module. I gave them getters and setters in both WebinarsPart.cs and WebinarRecord.cs


I decided then not to use them at all and deleted the getters and setters and fields all through out the module. I never made changes to the Migration.cs file. I never added columns for them to my DB. I never created any view Models for them. There is currently no reference whatsoever to these fields I added and then deleted.

However, Nhibernate insists they sre still there and throws me this error.


Could not find a getter for property 'ProductId1' in class 'Pryor.Webinars.Models.WebinarRecord'

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: NHibernate.PropertyNotFoundException: Could not find a getter for property 'ProductId1' in class 'Pryor.Webinars.Models.WebinarRecord'

Source Error: 

Line 82: 
Line 83:             Configuration config = GetConfiguration();
Line 84:             var result = config.BuildSessionFactory();
Line 85:             Logger.Debug("Done building session factory");
Line 86:             return result;


Is there somekind of Cache that Nhibernate/Orchard has that I need to get rid of?? It doesn't exist anywhere in my solution anymore. Why does Nhibernate/Orchard still think it does??

Please Help.



Jan 12, 2012 at 4:16 PM

Try deleting mappings.bin in App_Data\Sites\[SiteName].

Jan 12, 2012 at 4:26 PM

will this regenerate on it's own.?

Jan 12, 2012 at 5:22 PM

I wouldn't say delete it otherwise.

Anyway, you realise you could just rename it or move it somewhere safe if you're worried?

Jan 12, 2012 at 6:47 PM

Yes did that. Fixed my problem. Thank you.

Feb 10, 2012 at 8:30 PM

Is this a bug? I've had the same problem and luckily found this post.

Feb 10, 2012 at 8:57 PM

Deleting the mappings.bin didn't work for me so I did Build/Clean Solution in VS and then a Build/Rebuild Solution. That sorted it out.