Check the Monorail & ActiveRecord Integration article:
http://www.castleproject.org/monorail/documentation/v20/integration/ar.html

On 21 jun, 21:46, Luiz CS Lazari <[email protected]> wrote:
> Hello, I'm having trouble doing a databind in the class that is using
> one of its properties in the HABTM.
>
> I created a relationship between users and groups, with the intention
> of assembling a control profiles. For that I'm using the HABTM as in
> the example below:
>
>     [ActiveRecord]
>     public class Users : BaseModel<short, Users>
>     {
>         #region Members
>
>         [HasAndBelongsToMany(typeof(Groups),
>             Table = "Profiles",
>             ColumnKey = "uid",
>             ColumnRef = "gid", Inverse = false, Lazy = true, Cascade =
> ManyRelationCascadeEnum.SaveUpdate)]
>         public IList Profile { get; set; }
>
>         #endregion Members
>     }
>
> In the controller I'm using this:
>
>     public class UsersController : CrudBController<Users>
>     {
>         public UsersController() : base("") {}
>
>         public override void Update([DataBind("frmUser")] Users users)
>         {
>             base.Update(users);
>         }
>     }
>
> I found some articles that talk about different ways to use composite
> key, but what caught my attention was this.
>
> My difficulty is to perform the databinding when sending form data to
> the controller. I am not sure how to capture the data attributing the
> IList and save them dynamically in the table.
>
> Thanks & regards.

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