Why Castle ActiveRecordStarter.Initialize(); is in the class?

and

Where is the code like this in your application?

var config = ActiveRecordSectionHandler.Instance;


ActiveRecordStarter.Initialize(config, 
                typeof(Charater))



On Tue, 2010-03-30 at 14:30 -0700, Subnus wrote:

> i have these classes http://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
> 




Abs.

Marcello Felipelli
[email protected]
http://www.mvf.inf.br
msn
[email protected]
gtalk
[email protected]
skype
marcellovf
twitter
@marcellovf






















-- 
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.

Reply via email to