This is a migrated thread and some comments may be shown as answers.

Custom Identity Generators

3 Answers 82 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ian Perks
Top achievements
Rank 1
Ian Perks asked on 09 Feb 2010, 02:54 PM
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?

3 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 12 Feb 2010, 08:23 AM
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.
0
Sc
Top achievements
Rank 1
answered on 23 Jun 2014, 12:18 PM
Good morning,
it is possible to know if the feature of write an own key generator is now available ?

Thank you.
Stefano Cerutti.
0
Viktor Zhivkov
Telerik team
answered on 26 Jun 2014, 12:18 PM
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.

Regards,
Viktor Zhivkov
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
Tags
General Discussions
Asked by
Ian Perks
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Sc
Top achievements
Rank 1
Viktor Zhivkov
Telerik team
Share this question
or