So the problem was you were trying to map two properties on two
classes to a single column, correct?
> one in the Charater class and ones in the Rank nested class when i
> change [Nested] to [Nested("Rank_")]
> i worked
>
> On Mar 31, 12:48 am, Mauricio Scheffer <[email protected]>
> wrote:
>> 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 <[email protected]> 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 [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.
>
>
--
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.