Solucionado. Al final deje el ISessionFactory de la sgte manera return new Configuration().Configure().BuildSessionFactory();
y me funciono altiro.. Gracias.. Sldos. On 25 jul, 18:07, Alexis <[email protected]> wrote: > Hola, > realice los cambios q comentaron y nada.. lo raro es que los xml. > si me funcionan de la sgte manera. > > Configuration cfg = new Configuration(); > cfg.Configure("nhibernate.cfg.xml"); > ISessionFactory sesiones = cfg.BuildSessionFactory(); > ISession sesion = sesiones.OpenSession(); > MonoPos.Entity.Category cat= new MonoPos.Entity.Category(); > cat.Id = "001"; > cat.Name = "Detergente"; > sesion.SaveOrUpdate(cat); > sesion.Flush(); > sesion.Close(); > > :-/ alguna otra idea? > On 25 jul, 14:47, Edgar Ramos <[email protected]> wrote: > > > > > Observo info redundante en la configuracion de archivo de mapeo, > > assembly y namespace, y de nuevo en class name, si tu namespace esta > > bien, en class ingresa solo el nombre de la clase. > > > <?xml version="1.0" encoding="utf-8" ?> > > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" > > assembly="MonoPos" namespace="MonoPos.Entity" default-lazy="false"> > > > <class name="MonoPos.Entity.Category,MonoPos" table="Categories" > > > <id name="Id" column ="ID" type="string" length="255"/> > > <property name="Name" type="string" length="255"/> > > </class> > > </hibernate-mapping> > > > El día 25 de julio de 2010 11:20, Alexis <[email protected]> escribió: > > > > Hola, > > > llevo días peleando con el sgte error. > > > Estoy usando mono 2.4 > > > Firebird 2.5 > > > Monodevelop 2.2 > > > Nhibernate 2.1.2.4 > > > > Debo decir q el ejemplo de Dario me funciona a la perfeccion. > > >http://darioquintana.com.ar/articles/tutorial-de-nhibernate-primeros-... > > > > Pero de esta forma no hay caso. > > > > La clases la tengo en un proyecto "Monopos" > > > y las pruebas en un proyecto "Monopos.Test" > > > > Probe las Sgtes Llamadas : > > > > Configuration config = new Configuration(); > > > config.AddAssembly("MonoPos"); > > > return config.BuildSessionFactory(); > > > > y esta : > > > > return new Configuration() > > > .Configure() > > > .AddAssembly(typeof(SessionManager).Assembly) > > > .BuildSessionFactory(); > > > > Exception = Could not compile the mapping document: Category.hbm.xml > > > InnerException = ExCould not find the dialect in the configuration > > > > ---------------- > > > Category.hbm.xml----------------------------------------------------------- > > > <?xml version="1.0" encoding="utf-8" ?> > > > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" > > > assembly="MonoPos" namespace="MonoPos.Entity" default-lazy="false"> > > > > <class name="MonoPos.Entity.Category,MonoPos" table="Categories" > > > > > > > <id name="Id" column ="ID" type="string" length="255"/> > > > <property name="Name" type="string" length="255"/> > > > </class> > > > </hibernate-mapping> > > > --------------------------------------------------------------------------------------------------- > > > ---------------- > > > hibernate.cfg.xml------------------------------------------------------------- > > > <?xml version="1.0" encoding="utf-8" ?> > > > <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > > > > <session-factory name="Firebird"> > > > <property > > > name="connection.provider">NHibernate.Connection.DriverConnectionProvider</ > > > property> > > > <property name="dialect">NHibernate.Dialect.FirebirdDialect</ > > > property> > > > <property > > > name="connection.driver_class">NHibernate.Driver.FirebirdClientDriver</ > > > property> > > > <property name="connection.connection_string"> > > > Server=localhost; > > > Database=/var/lib/firebird/data/monopos.fdb; > > > User=SYSDBA;Password=masterkey > > > </property> > > > <property name="show_sql">true</property> > > > <property name="command_timeout">60</property> > > > <property name="query.substitutions">true 1, false 0, yes > > > 1, no 0, 1 > > > true, 0 false</property> > > > <property > > > name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, > > > NHibernate.ByteCode.LinFu</property> > > > <mapping assembly="MonoPos" /> > > > </session-factory> > > > </hibernate-configuration> > > > --------------------------------------------------------------------------------------------------------- > > > > -- > > > Para escribir al Grupo, hágalo a esta dirección: > > > [email protected] > > > Para más, visite:http://groups.google.com/group/NHibernate-Hispano -- Para escribir al Grupo, hágalo a esta dirección: [email protected] Para más, visite: http://groups.google.com/group/NHibernate-Hispano
