I have a content type for product orders "Order" and ideally I would like the identity field to be sequential, or to at least have a sequential "OrderNumber" field.
Currently content items of all content types in Orchard share the same identifier in the Orchard_Framework_ContentItemRecord table.
So if I have a new customer to the site and they create a new order that contains two order lines, I get a customer with id 150, the order has id 151 and the order lines get 152 & 153. Then the next order gets order id 154.
I'm thinking it would be good to have some kind of "Sequential Identity" part that could be added to a content type that would give you a "Number" field that would automatically get the next value in the sequence for that content type
when the content type is being created. The part could have some options to allow you to set the initial (or next) id value for the content type it's associated with.
So I guess the question is, does any capability like this already exist in Orchard?
If not, is this something that could be integrated into the core "Identity" part? So if you're content type has the Identity part, in the content type definition, some options could exist when you expand out the Identity part (eg. "Use sequential
id for this content type" and "Next id to use"). If this option was enabled, the content item's true identity (in the Orchard_Framework_ContentItemRecord table) would not be exposed, instead a content type specific id could be exposed. This
could even go so far as being used in the URL routing for the content type.
Otherwise I'm thinking a "Sequential Identity" part might be the way to go?
Any thoughts would be appreciated.