I think currently all your mappings need to be public. We might be able to address this.
On 1/15/09, nformosa <nform...@gmail.com> wrote: > > Thanks for that tip James. > > I was setting the ClassMaps to internal so they weren't being read. > > Can i contain these maps within the dll in another way so the > application would work? > > REgards > Nick > > On Jan 14, 12:11 pm, James Gregory <jagregory....@gmail.com> wrote: >> After the persistenceModel.Configure(cfg) inspect the cfg object, you >> should >> be able to see which classes have been mapped. Is the one you're using in >> there? >> >> On Wed, Jan 14, 2009 at 11:05 AM, nformosa <nform...@gmail.com> wrote: >> >> > Hi All, >> >> > I'm starting off with Fluent and its seems, until my first error, that >> > its a much better way of implementing nhibernate than using xml >> > mappings at least code is something that i can interpret easier than >> > xml. >> >> > Any way...my first try and i have my first problem. I keep getting the >> > following error: "Undefined alias or unkown mapping: *[SELECT * FROM >> > NhibernateTest.Entities.Country] >> >> > Stake trace: >> >> > at NHibernate.Hql.Classic.PathExpressionParser.Token(String token, >> > QueryTranslator q) >> > at NHibernate.Hql.Classic.ParserHelper.Parse(IParser p, String >> > text, String seperators, QueryTranslator q) >> > at NHibernate.Hql.Classic.SelectParser.Token(String token, >> > QueryTranslator q) >> > at NHibernate.Hql.Classic.ClauseParser.Token(String token, >> > QueryTranslator q) >> > at NHibernate.Hql.Classic.ClauseParser.End(QueryTranslator q) >> > at NHibernate.Hql.Classic.PreprocessingParser.End(QueryTranslator >> > q) >> > at NHibernate.Hql.Classic.ParserHelper.Parse(IParser p, String >> > text, String seperators, QueryTranslator q) >> > at NHibernate.Hql.Classic.QueryTranslator.Compile() >> > at NHibernate.Hql.Classic.QueryTranslator.Compile(IDictionary`2 >> > replacements, Boolean scalar) >> > at NHibernate.Engine.Query.HQLQueryPlan..ctor(String hql, String >> > collectionRole, Boolean shallow, IDictionary`2 enabledFilters, >> > ISessionFactoryImplementor factory) >> > at NHibernate.Engine.Query.HQLQueryPlan..ctor(String hql, Boolean >> > shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor >> > factory) >> > at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(String >> > queryString, Boolean shallow, IDictionary`2 enabledFilters) >> > at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(String >> > query, Boolean shallow) >> > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(String >> > queryString) >> > at NHibernateTest.DataAccess.Beans.EAO`1.GetAllObjects[T](String >> > str) in C:\Documents and Settings\nicholasf\My Documents\Visual Studio >> > 2008\Projects\NHibernateTest\NHibernateTest\DataAccess\Beans >> > \EAO.cs:line 49 >> > at NHiberateTestFrontEnd.Form1.button1_Click(Object sender, >> > EventArgs e) in C:\Documents and Settings\nicholasf\My Documents >> > \Visual Studio 2008\Projects\NHiberateTestFrontEnd >> > \NHiberateTestFrontEnd\Form1.cs:line 27 >> > at System.Windows.Forms.Control.OnClick(EventArgs e) >> > at System.Windows.Forms.Button.OnClick(EventArgs e) >> > at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) >> > at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons >> > button, Int32 clicks) >> > at System.Windows.Forms.Control.WndProc(Message& m) >> > at System.Windows.Forms.ButtonBase.WndProc(Message& m) >> > at System.Windows.Forms.Button.WndProc(Message& m) >> > at System.Windows.Forms.Control.ControlNativeWindow.OnMessage >> > (Message& m) >> > at System.Windows.Forms.Control.ControlNativeWindow.WndProc >> > (Message& m) >> > at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr >> > hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) >> > at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& >> > msg) >> > at >> >> > System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.Unsa >> > feNativeMethods.IMsoComponentManager.FPushMessageLoop >> > (Int32 dwComponentID, Int32 reason, Int32 pvLoopData) >> > at >> > System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner >> > (Int32 reason, ApplicationContext context) >> > at System.Windows.Forms.Application.ThreadContext.RunMessageLoop >> > (Int32 reason, ApplicationContext context) >> > at System.Windows.Forms.Application.Run(Form mainForm) >> > at NHiberateTestFrontEnd.Program.Main() in C:\Documents and Settings >> > \nicholasf\My Documents\Visual Studio 2008\Projects >> > \NHiberateTestFrontEnd\NHiberateTestFrontEnd\Program.cs:line 18 >> > 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() >> >> > Is there something i'm missing? the following is my SEssion Manager: >> >> > private ISessionFactory GetSessionFactory() >> > { >> > IPersistenceConfigurer persistenceConfigurer = >> > MySQLConfiguration >> > .Standard >> > .ConnectionString.Is >> > ("Database=HostelWebSystem;Data Source=localhost;User >> > Id=root;Password=gandalF13") >> > .ShowSql(); >> >> > Configuration cfg = >> > persistenceConfigurer.ConfigureProperties(new Configuration()); >> >> > var persistenceModel = new PersistenceModel(); >> > persistenceModel.addMappingsFromAssembly(Assembly.Load >> > (_mappingAssembly)); >> > persistenceModel.Configure(cfg); >> >> > return cfg.BuildSessionFactory(); >> > } >> >> > Thanks for your help >> >> > Regrds >> > Nick F > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibernate@googlegroups.com To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---