On Sep 8, 10:56 am, Will Gorman <[email protected]> wrote:
> Thanks, I noticed the before_create hook shortly after posting this and was
> thinking of trying to create a plugin that would automatically do that for
> models.  If the sequence is set on the dataset defined for the model, like
> set_dataset DB[:some_table].sequence(:some_sequence) is there any way for a
> plugin to get access to the sequence name?

In a before_create hook, you could get a sequence (if any) using:

  model.dataset.opts[:sequence]

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to