Oh, My bad!! I just figured it out. Made a mistake with my setter for the FunFact property. I was over writing the name private value!!!!
Thanks for your help. I'm good now. On Mon, Mar 8, 2010 at 11:22 AM, Nicholas Kilian < [email protected]> wrote: > Can you post your Person class to show the AR attributes? > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Kevin Pratt > *Sent:* 08 March 2010 08:03 AM > *To:* [email protected] > *Subject:* Objects being created will all properties null > > > > Hello > > > > I'm trying out ActiveRecord for the first time and I am having some > trouble. > > > > When I instantiate a new model and then call create a record is created in > the database but all the properties are set to null. > > > > Example code: > > > > var person = new Person {Name = "Kevin"}; > > person.Name = "kevin"; > > person.Create(); > > > > FlushAndRecreateScope(); > > > > Person[] people = Person.FindAll(); > > Assert.AreEqual(1,people.Length); > > Assert.AreEqual("Kevin",people[0].Name); > > > > The FlushAndRecreateScope method is from the unit test example at : > http://www.castleproject.org/activerecord/documentation/v1rc1/usersguide/unittesting.html > > > > I've used both sqlite and mssqlce to test with. > > > > My app.config file is as follows: > > > > <?xml version="1.0" encoding="utf-8" ?> > > <configuration> > > <configSections> > > <section name="activerecord" > > > type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, > Castle.ActiveRecord" /> > > </configSections> > > > > <activerecord > > isDebug="true"> > > <!-- > > <config> > > <add key="connection.provider" > > value="NHibernate.Connection.DriverConnectionProvider" /> > > <add key="dialect" > > value="NHibernate.Dialect.MsSqlCeDialect" /> > > <add key="connection.driver_class" > > value="NHibernate.Driver.SqlServerCeDriver" /> > > <add key="connection.connection_string" > > value="Data Source=D:\Databases\test.sdf" /> > > <add key="proxyfactory.factory_class" > > > value="NHibernate.ByteCode.Castle.ProxyFactoryFactory,NHibernate.ByteCode.Castle"/> > > <add key="show_sql" > > value="true" /> > > </config> > > --> > > <config> > > <add key="connection.provider" > > value="NHibernate.Connection.DriverConnectionProvider" /> > > <add key="dialect" > > value="NHibernate.Dialect.SQLiteDialect" /> > > <add key="connection.driver_class" > > value="NHibernate.Driver.SQLite20Driver" /> > > <add key="connection.connection_string" > > value="Data Source=D:\Databases\test.db" /> > > <add key="proxyfactory.factory_class" > > > value="NHibernate.ByteCode.Castle.ProxyFactoryFactory,NHibernate.ByteCode.Castle"/> > > <add key="show_sql" > > value="true" /> > > </config> > > > > </activerecord> > > </configuration> > > > > > > Also I am configuring the system using the IConfigureSource method: > > > > IConfigurationSource source = > ActiveRecordSectionHandler.Instance; > > > > //ActiveRecordStarter.Initialize(source); > > > ActiveRecordStarter.Initialize(Assembly.Load("ActiveRecord"),source); > > > > My project's name is ActiveRecord. > > > > If anyone has any insight as to why this would be happening I would love to > hear it!. > > > > Thanks > > > > Kevin Pratt > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to [email protected] > . > To unsubscribe from this group, send email to > [email protected]<castle-project-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to [email protected] > . > To unsubscribe from this group, send email to > [email protected]<castle-project-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en.
