Custom Identity Generators

Thread is closed for posting
4 posts, 0 answers
  1. Ian Perks
    Ian Perks avatar
    1 posts
    Member since:
    Feb 2010

    Posted 09 Feb 2010 Link to this post

    I've been investigating OpenAccess ORM for a particular project that I'm about to start work on.  I've spent some time looking at nHibernate too so as to understand the differences between the two and come up with a judgement as to which one to recommend.  One of the major problems with the reverse mapping that we will ultimately have to do is that the database design we are working against has some significant drawbacks.

    One of the most pressing areas is around id generation for a given table and I'll explain why. The database design that I'm stuck with means that the primary key id for a given table is usually defined but the corresponding auto-increment property generally isn't.  The id comes from a "sequence" (of sorts) - with the value for the next item retrieved using a stored procedure.  nHibernate can handle this as within the mapping file for a given class you can specify a custom id generator within a given id mapping and by writing a class that implements IIdentifierGenerator and IConfigurable the rest is relatively easy.  My question is this: is this kind of thing possible with OpenAccess ORM and if yes how?
  2. Jan Blessenohl
    Jan Blessenohl avatar
    707 posts

    Posted 12 Feb 2010 Link to this post

    Hi Ian Perks,
    At the moment it is not possible to write your own key generator. What you can always do is to execute your SP, set the id in your object, add it to the scope and commit it to the database.

    All the best,
    Jan Blessenohl
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Sc
    Sc avatar
    1 posts
    Member since:
    Feb 2013

    Posted 23 Jun 2014 Link to this post

    Good morning,
    it is possible to know if the feature of write an own key generator is now available ?

    Thank you.
    Stefano Cerutti.
  4. Viktor Zhivkov
    Viktor Zhivkov avatar
    324 posts

    Posted 26 Jun 2014 Link to this post

    Hi Stefano,

    I am sorry, but you are still not able to create and plug in custom key generators in Telerik Data Access.
    You are welcome to post a feature request in our Ideas and Feedback portal with more details about the behavior and the use case scenarios for the custom key generator.

    Viktor Zhivkov
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
Back to Top