Problem with HibernateProperty in FluentNhibernate template

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Posts: 1
Joined: Wed 30 May 2012 07:08

Problem with HibernateProperty in FluentNhibernate template

Post by tiger727 » Wed 30 May 2012 07:23


I am currently using Entity Developer 4.3.169 (NHibernate).

I got a problem with the FluentNhibernate Template. I add a Extended Property onto HibernateProperty called CustomType, I can access the property in NHibernate Template using property.GetProperty("CustomType").

But when I try to access using the same method in FluentNHibernate Template, it saids unknow property CustomType, it seems the HibernateProperty in FluentNHibernate Template doesn't recognize the Extended Property, what can I do to create new properties in the FluentNHibernate? or What is the correct way to access extended property in FluentNHibernate Template?

Site Admin
Posts: 8242
Joined: Thu 14 Aug 2008 12:44

Re: Problem with HibernateProperty in FluentNhibernate templ

Post by Shalex » Fri 01 Jun 2012 12:36

We have checked the latest (4.4.186) version of Entity Developer. It compiles and uses extended properties correctly.
An example:
- an extended property directive

Code: Select all

<#@ extended name="myproperty" owner="Property" type="System.Boolean" Default="True"#>
- its usage

Code: Select all

      foreach (HibernateProperty property in cls.Properties) {
  	    if ((bool)property.GetProperty("myproperty")) {...}
Make sure that:
1) the template with an extended property directive is added to the model
2) you have saved the template with an extended property before generating code for context model

If this doesn't help, please send us your Fluent NHibernate Template, in which an extended property is declared and used, so that we can reproduce the issue in our environment.

Post Reply