Maybe the ActiveRecord mapping doesn't match the database schema. Are you creating the schema with ActiveRecordStarter.CreateSchema() or working against an existing database?
On Mar 30, 6:30 pm, Subnus <sub...@gmail.com> wrote: > i have these classeshttp://pastebin.com/UCNJY45s > > I'm trying to run this > > using Castle.ActiveRecord; > using Maplestory.Stats.data; > > namespace Maplestory.Stats > { > class Program > { > static void Main(string[] args) > { > ActiveRecordStarter.Initialize(); > Charater charater = new Charater(); > charater.IsMain = true; > charater.Job = Job.Warrior; > charater.Level = 17; > > User user = User.findByName("subnus"); > user.Charaters.Add(charater); > user.SaveAndFlush(); > } > } > > } > > but i get the error > "Could not perform Save for User" > > and the inner exception is > "{"object references an unsaved transient instance - save the > transient instance before flushing. Type: > Maplestory.Stats.data.Charater, Entity: > Maplestory.Stats.data.Charater#0"}" > > but if i save the charater before adding it to charaters list i get > the error > "Could not perform Save for Charater" > > and the inner exception > "{"Parameter index is out of range."}" > source: "MySql.Data" > > I'm new to Castle.ActiveRecord but i can't see what the problem is -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to castle-project-us...@googlegroups.com. To unsubscribe from this group, send email to castle-project-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.