Hi, Sorry for my poor english, lol.
Indeed i have one composite key, where one user have multiple profiles. Using HABTM can only list the data to write, I need to create an interface using the scalarquery. I wonder if there is an easier way to make, since in the profiles table, I created a field of primary key, to avoid using key compound, because I know that is not advisable. I get a list of profiles of the browser, where I need to write the same for the selected user. I'm trying to make a databind in user class but can not. On 22 jun, 17:54, Henry Conceição <[email protected]> wrote: > Check the Monorail & ActiveRecord Integration > article:http://www.castleproject.org/monorail/documentation/v20/integration/a... > > 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.
