Hi Paul that is correct. I would like to access the KeyProperties. I have not tried to update ICompositeIdentityInstance. I have no problem contributing, but I have to learn how to use GIT first, which is a barrier right now due to my current schedule.
On Feb 13, 6:57 am, Paul Batum <paul.ba...@gmail.com> wrote: > Hi Corey, > > If I'm following you correctly, the issue is the ICompositeIdentityInstance > interface. It doesn't provide a way to alter the KeyProperties, but if it > did, use that mechanism to update the mapping based on the values of some > custom attributes. > > Does that sound correct to you? Have you tried adding the necessary members > to ICompositeIdentityInstance? > > Paul > > On Wed, Jan 27, 2010 at 4:33 AM, Corey Coogan <coreycoo...@yahoo.com> wrote: > > I think I was confused on what this convention would actually do. I > > see that this is a convention to be applied to Composite ID mappings. > > That is very useful, but I was actually looking for a way to read a > > custom attribute from a class and map a composite ID from the > > convention itself, like I can do with the IIdConvention. I think I > > totally missed the boat on the intention but see the intentions after > > paying attention to the unit tests. > > > Here's what I can do with the IIdConvention: > > > id.Column("Id"); > > id.UnsavedValue("0"); > > id.GeneratedBy.Identity(); > > > I expecting something similar like this (keep in mind I would pull my > > PK from attributes) > > > instance.KeyColumns.Add("PolicyNumber","POLICY_NUMBER") > > .KeyColumnsAdd("PolicyDateTime","POLICY_DATE_TIME"); > > > Is there something I'm missing or is the intention of this convention > > to apply properties/settings to composite identity mappings from > > ClassMap<T>? > > > Thanks, > > Corey > > > On Jan 26, 8:50 am, Corey Coogan <coreycoo...@yahoo.com> wrote: > > > I'll have a look at it today and letyou know how it ends up. > > > > On Jan 25, 9:41 pm, Paul Batum <paul.ba...@gmail.com> wrote: > > > > > Hi Corey, > > > > > I've managed to get Chris's work into my dev branch, one of the tests > > was > > > > failing but that has now been resolved. > > > > > Its available here: > >http://github.com/paulbatum/fluent-nhibernate/tree/dev > > > > > Can you let me know how it goes? I would prefer to let you have a run > > with > > > > it before I ask James to pull these changes through. > > > > > Paul > > > > > On Sat, Jan 23, 2010 at 12:28 AM, Paul Batum <paul.ba...@gmail.com> > > wrote: > > > > > Yeah my bad, this one ended up in the black hole that is my starred > > items > > > > > in gmail. I can set aside some time to look at this over the next few > > days. > > > > > > On Tue, Jan 19, 2010 at 7:49 AM, Hudson Akridge < > > hudson.akri...@gmail.com>wrote: > > > > > >> I'm not an automapping guru sadly :( So again, there might be some > > > > >> workarounds that I'm unaware of (very possible). Hoping for Paul or > > James to > > > > >> chime in. They know much more about automapping than me. > > > > > >> On Mon, Jan 18, 2010 at 2:29 PM, Corey Coogan < > > coreycoo...@yahoo.com>wrote: > > > > > >>> Thanks Hudson, > > > > >>> I saw this thread where Chris C. wrote an implementation in > > > > >>> November 09, but I don't see it in the trunk. > > >http://groups.google.com/group/fluent-nhibernate/browse_thread/thread... > > > > > >>> I don't know where this ever ended up. Is there any other work > > around > > > > >>> for this? I really don't want to create mappings for all my tables > > by > > > > >>> hand just to specify the PKs. > > > > > >>> On Jan 18, 2:03 pm, Hudson Akridge <hudson.akri...@gmail.com> > > wrote: > > > > >>> > I could be wrong, but I don't believe automapping supports > > composite > > > > >>> Id's. > > > > >>> > At least I've never seen an example with that working. Id is the > > > > >>> default > > > > >>> > choice when automapper fires, which is probably why there's not > > an > > > > >>> > automapping convention for compositeId. > > > > > >>> > Someone else might come along and correct me though. > > > > > >>> > On Mon, Jan 18, 2010 at 1:23 PM, Corey Coogan < > > coreycoo...@yahoo.com> > > > > >>> wrote: > > > > >>> > > I am trying to figure out a solution to using a convention for > > > > >>> > > defining my composite key with AutoMapping. I've read some > > stuff but > > > > >>> > > haven't found anything concrete. Almost all of my entities > > have a > > > > >>> > > composite key that consists of a string and a date. > > > > > >>> > > We have a code generator that is converting our Oracle DB > > tables into > > > > >>> > > entities. I'm using custom attributes to decorate the entity > > with > > > > >>> the > > > > >>> > > following info: > > > > > >>> > > - TableName - tells the class convention what table it maps to > > > > >>> > > - Primary Keys - should tell some convention what the primary > > key > > > > >>> > > columns are > > > > >>> > > - Column Name - tells the Property convention what column the > > > > >>> property > > > > >>> > > maps to > > > > > >>> > > Since the entities are generated straight from the DB, I was > > hoping > > > > >>> to > > > > >>> > > rely on Automapping and conventions to avoid any manual > > mapping. I > > > > >>> > > see the IdConvention, but I'm not sure if that will work for > > > > >>> Composite- > > > > >>> > > Id. The only code I see is something that was written to a > > fork but > > > > >>> > > apparently never committed. > > > > > >>> > > Any ideas how to do this? > > > > > >>> > > -- > > > > >>> > > You received this message because you are subscribed to the > > Google > > > > >>> Groups > > > > >>> > > "Fluent NHibernate" group. > > > > >>> > > To post to this group, send email to > > > > >>> fluent-nhibern...@googlegroups.com. > > > > >>> > > To unsubscribe from this group, send email to > > > > >>> > > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > > <fluent-nhibernate%2bunsubscr...@googlegroups.com<fluent-nhibernate%252bunsubscr...@googlegroups.com> > > > > > >>> <fluent-nhibernate%2bunsubscr...@googlegroups.com<fluent-nhibernate%252bunsubscr...@googlegroups.com> > > <fluent-nhibernate%252bunsubscr...@googlegroups.com<fluent-nhibernate%25252bunsubscr...@googlegroups.com> > > > > > >>> > > . > > > > >>> > > For more options, visit this group at > > > > >>> > >http://groups.google.com/group/fluent-nhibernate?hl=en. > > > > > >>> > -- > > > > >>> > - Hudsonhttp://www.bestguesstheory.comhttp:// > > twitter.com/HudsonAkridge > > > > > >>> -- > > > > >>> You received this message because you are subscribed to the Google > > Groups > > > > >>> "Fluent NHibernate" group. > > > > >>> To post to this group, send email to > > fluent-nhibern...@googlegroups.com. > > > > >>> To unsubscribe from this group, send email to > > > > >>> fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > > <fluent-nhibernate%2bunsubscr...@googlegroups.com<fluent-nhibernate%252bunsubscr...@googlegroups.com> > > > > > >>> . > > > > > >>> For more options, visit this group at > > > > >>>http://groups.google.com/group/fluent-nhibernate?hl=en. > > > > > >> -- > > > > >> - Hudson > > > > >>http://www.bestguesstheory.com > > > > >>http://twitter.com/HudsonAkridge > > > > > >> -- > > > > >> You received this message because you are subscribed to the Google > > Groups > > > > >> "Fluent NHibernate" group. > > > > >> To post to this group, send email to > > fluent-nhibern...@googlegroups.com. > > > > >> To unsubscribe from this group, send email to > > > > >> fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > > <fluent-nhibernate%2bunsubscr...@googlegroups.com<fluent-nhibernate%252bunsubscr...@googlegroups.com> > > > > > >> . > > > > >> For more options, visit this group at > > > > >>http://groups.google.com/group/fluent-nhibernate?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Fluent NHibernate" group. > > To post to this group, send email to fluent-nhibern...@googlegroups.com. > > To unsubscribe from this group, send email to > > fluent-nhibernate+unsubscr...@googlegroups.com<fluent-nhibernate%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/fluent-nhibernate?hl=en. -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to fluent-nhibern...@googlegroups.com. To unsubscribe from this group, send email to fluent-nhibernate+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en.