Hello

I am trying to combine Fluent NHibernate AutoMapping and Rhino
Security in a simple project, to test it before implementing it into
something bigger.

Sadly I run into.

"An association from the table RhinoUser refers to an unmapped class:
Rhino.Security.SecurityInfo"

That I cannot solve.

I am using the latest Rhino Security 1.3 from git.

Code snippets:


 public class RhinoUser : IUser
    {
        virtual public int id { get; private set; }
        virtual public string Name { get; set; }
        virtual public SecurityInfo SecurityInfo { get; set; }
    }


      return Fluently.Configure()
              .Database(
               FluentNHibernate.Cfg.Db.MsSqlConfiguration.MsSql2005
                    .ConnectionString("Server=MYSERVER;Database=Pets;User
ID=MYUSERWITHFULLRIGHTS;Password=MYPASSWORD;Trusted_Connection=False;")
              )
              .Mappings(m =>
                  {
                         //Am I missing something here?
                         .Add(AutoMap.AssemblyOf<Pet>(cfg));
                  }
              )
              .BuildSessionFactory();


Please give me some hints. Let me also point out that I've found a few
suggestions on the web, but they clearly work with some References I
do not have.

For example:
Security.InitializeConfiguration .. can't find it anywhere. And there
are references to 1.3 being older then 2.0 - when its the other way
around? The current GIT is the most recent one?

http://www.mail-archive.com/[email protected]/msg02716.html


Full Trace:
--------------------------
FluentNHibernate.Cfg.FluentConfigurationException was unhandled
  Message="An invalid or incomplete configuration was used while
creating a SessionFactory. Check PotentialReasons collection, and
InnerException for more detail.\r\n\r\n"
  Source="FluentNHibernate"
  StackTrace:
       at
FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
       at NHibernatePets.Program.CreateSessionFactory() in C:\Users
\johan.johansson\Documents\Visual Studio 2008\Projects\NHibernatePets
- [Fluent]\NHibernatePets\Program.cs:line 184
       at NHibernatePets.Program.Main() in C:\Users\johan.johansson
\Documents\Visual Studio 2008\Projects\NHibernatePets - [Fluent]
\NHibernatePets\Program.cs:line 96
       at System.AppDomain._nExecuteAssembly(Assembly assembly,
String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
       at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: NHibernate.MappingException
       Message="An association from the table RhinoUser refers to an
unmapped class: Rhino.Security.SecurityInfo"
       Source="NHibernate"
       StackTrace:
            at NHibernate.Cfg.Configuration.LogAndThrow(Exception
exception)
            at
NHibernate.Cfg.Configuration.SecondPassCompileForeignKeys(Table table,
ISet done)
            at NHibernate.Cfg.Configuration.SecondPassCompile()
            at NHibernate.Cfg.Configuration.BuildSessionFactory()
            at
FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory()
       InnerException:

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to