BeforeCreate with the class check sounds like the way to go - just use that to manually set the ID of the object before it is inserted, and you should be all good to go.
Mark On Fri, Jun 24, 2011 at 12:27 AM, Robert Rawlins <rob...@supporttime.com>wrote: > Hello All, > > I've got a use case which requires me to generate unique ID's for records, > based on an augmented incrementing numerical ID. This is for a purchasing > system and will generate ID's like: > > PO-0002 > PO-0003 > PO-0004 > PO-0005 > > I can't find any details in the documents about being able to easily define > a custom generator. Is there a way to do that? > > My other thought is to perhaps use a BeforeCreate event to generate the ID, > is that a reasonable way of doing this? My worry is that the beforeCreate > gets called for every single entity, so I assume I'd have to put some logic > in the event handler that checks the class type before generating the ID? > > Thanks, > > Robert > > -- > Before posting questions to the group please read: > > http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer > > Try out the new Transfer ORM Custom Google Search: > http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8 > > You received this message because you are subscribed to the Google Groups > "transfer-dev" group. > To post to this group, send email to transfer-dev@googlegroups.com > To unsubscribe from this group, send email to > transfer-dev+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/transfer-dev?hl=en > -- E: mark.man...@gmail.com T: http://www.twitter.com/neurotic W: www.compoundtheory.com cf.Objective(ANZ) - Nov 17, 18 - Melbourne Australia http://www.cfobjective.com.au Hands-on ColdFusion ORM Training www.ColdFusionOrmTraining.com -- Before posting questions to the group please read: http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer Try out the new Transfer ORM Custom Google Search: http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8 You received this message because you are subscribed to the Google Groups "transfer-dev" group. To post to this group, send email to transfer-dev@googlegroups.com To unsubscribe from this group, send email to transfer-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en