How do I do that here when I want to make "channelid" part of the UniqueKey?
[HasMany(typeof(Measurand), Table = "Measurands", ColumnKey = "channelid", Index="Datee")] Thanks, Flo On 1 Apr., 17:11, Markus Zywitza <markus.zywi...@gmail.com> wrote: > Add UniqueKey="some_identifier" to all properties whose combination should > be unique. > > -Markus > > 2009/4/1 Flominator <flomina.....@gmx.net> > > > > > Hi, > > > I'm talking about the following database structure: > > > MEASUREMENTS > > | > > ----------CHANNELS > > | > > --------------- MEASURANDS > > > CHANNELS HasMany MEASURANDS via channel_id (int) > > MEASURANDS has id in, date (DateTime), value (float) > > > Now I would like to make sure, that there are no MEASURANDS with the > > same date and channel_id. > > > I don't really know, how to do it. A composite key might be one > > approach, but I don't want to change every .id call within the > > programme. > > > I would like to use something like a Composite index, which wouldn't > > require to change the code at Measurements and other parts of the > > application. > > > I don't know, if AR/NHibernate supports such thing or if I should try > > to implement this via business logic. > > > Any suggestions? > > > Thanks, > > > Flo --~--~---------~--~----~------------~-------~--~----~ 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-users@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 -~----------~----~----~----~------~----~------~--~---