NHibernate
  1. NHibernate
  2. NH-2687

SchemaExport Should Create HiLo Columns

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Not an Issue
    • Affects Version/s: 3.2.0.Alpha2
    • Fix Version/s: None
    • Component/s: Toolset
    • Labels:
      None

      Description

      The SchemaExport class, when creating a table for the HiLo algorithm, does not take in consideration any eventual columns specified as its parameters.
      For example, if an entity is using a parameter defined as:

      <param name="column">MyEntityColumn</param>

      It should create table hibernate_unique_key with an additional MyEntityColumn column, but it does not.

        Activity

        Hide
        Fabio Maulo added a comment -

        Custom additional columns should be managed by you or your custom generator.
        An example is available here.
        http://code.google.com/p/codeconform/source/browse/ConfOrm/ConfOrm.UsageExamples/HighLowPerEntity/Demo.cs

        Please use the nhusers list for questions.

        Show
        Fabio Maulo added a comment - Custom additional columns should be managed by you or your custom generator. An example is available here. http://code.google.com/p/codeconform/source/browse/ConfOrm/ConfOrm.UsageExamples/HighLowPerEntity/Demo.cs Please use the nhusers list for questions.
        Hide
        Ricardo Peres added a comment -

        Fabio,
        But this is part of the standard HiLo generator, it is not a new feature to be implemented on a custom generator.
        Shouldn't it be the responsible for the creation of these additional columns?
        Thanks,
        RP

        Show
        Ricardo Peres added a comment - Fabio, But this is part of the standard HiLo generator, it is not a new feature to be implemented on a custom generator. Shouldn't it be the responsible for the creation of these additional columns? Thanks, RP
        Hide
        Sukh added a comment -

        I bumped into this issue myself today, and I would agree with Ricardo. If the Schema Export creates the HiLo table partially, yet only counts the final column name, surely that's a bug? Either it should create the whole table correctly or leave the entire table to be created manually?

        Show
        Sukh added a comment - I bumped into this issue myself today, and I would agree with Ricardo. If the Schema Export creates the HiLo table partially, yet only counts the final column name, surely that's a bug? Either it should create the whole table correctly or leave the entire table to be created manually?
        Hide
        Anthony Dewhirst added a comment -

        I agree with the comments that this should be fixed within the SchemaExport tool, but as it looks like this might not happen, I have created a solution along Fabio's solution for ConfORM for Fluent NHibernate here:
        http://www.anthonydewhirst.blogspot.com/2012/02/fluent-nhibernate-solution-to-enable.html

        Show
        Anthony Dewhirst added a comment - I agree with the comments that this should be fixed within the SchemaExport tool, but as it looks like this might not happen, I have created a solution along Fabio's solution for ConfORM for Fluent NHibernate here: http://www.anthonydewhirst.blogspot.com/2012/02/fluent-nhibernate-solution-to-enable.html

          People

          • Assignee:
            Unassigned
            Reporter:
            Ricardo Peres
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Who's Looking?