Hi Markus, thanks again for your help.
What about a feature that would introduce UniqueKey to HasMany. Would you consider that a good idea? Just curious. Regards, Flo On 2 Apr., 11:03, Markus Zywitza <[email protected]> wrote: > Make the channelId available as a column in Measurand. A non-update, > non-insert property suffices, you need the UniqueKey value only for creating > the DDL. > > -Markus > > 2009/4/2 Flominator <[email protected]> > > > > > 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 <[email protected]> wrote: > > > Add UniqueKey="some_identifier" to all properties whose combination > > should > > > be unique. > > > > -Markus > > > > 2009/4/1 Flominator <[email protected]> > > > > > 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 [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 -~----------~----~----~----~------~----~------~--~---
