I'd like to know if there's a way to ignore properties using Fluent 
mappings.

I'm posting a sample (please, it's not a real class, just something to 
explain what I need).
    public class SampleClass
    {
        public virtual int Id { get; protected set; }
        public virtual string S1 { get; set; }
        public string S2 { get; set; }
    }

Then I can use something like this to obtain a session factory
        public static ISessionFactory CreateSession()
        {
            return Fluently.Configure()
                
.Database(SQLiteConfiguration.Standard.UsingFile(dbFile).ShowSql())
                .Mappings(
                    m => 
m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly())
                )
                .ExposeConfiguration(BuildSchema)
                .BuildSessionFactory();
        }

What I'd like to have is that Id and S1 properties are persisted on db, 
while S2 is just a property to help me within my app.
Problem is that if I do not define S2 as virtual I get an error because 
proxy can't be created...

How can I solve this?

Thanks,
Marco

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fluent-nhibernate.
For more options, visit https://groups.google.com/d/optout.

Reply via email to