Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug in hibernateTranslator.xsl

    Hi,

    I found a bug in system/schema/hibernateTranslator.xsl.

    The xsl does not take into consideration foreingKey declarations.

    Is that a known bug or behavior?

    thanks

    #2
    What specific behavior are you expecting to result?

    Comment


      #3
      that we would create a one-to-many relationship link?

      Comment


        #4
        BTW - if i mentioned a sequenceName it didnt took it into consideration either

        Comment


          #5
          will you fix it?
          to have one-to-many relationships in case if foreignKey
          and a sequence when mentioned?

          Comment


            #6
            Please answer previous question - in detail.

            Comment


              #7
              Here's an example:

              This is the element in the ds.xml:
              <field name="address_id" type=number foreignKey=Address.Id>

              I want the XSL to create this in hibernate hbm.xml:
              <one-to-many name="address_id" entity-name=Address >
              <column name="address_id">
              </one-to-many>

              something like this.
              OK?

              Comment


                #8
                And what *specific behavior* would this enable. You appear to be talking about beanless mode, so it's not clear what you hope that adding this declaration would *actually do*.

                Comment


                  #9
                  i expect this behavior to enable me to perform customHQL queries,
                  where i can use the power of HQL to perform queries on sub-fields (e.d addres_is.street)

                  thanks!

                  Comment


                    #10
                    Finally. OK, that's an interesting enhancement that would be eligible for sponsorship. It's not a small fix, as it would necessitate loading all other defined Hibernate DataSources in order to discover that the FK reference is valid.

                    Comment


                      #11
                      i already have these lines written,
                      but it is hard to maintain it when that xsl is in the jar.

                      i dont mind not to have this assertion since i generate the fk by myself


                      BTW - same goes with sequence declerations - this would make the add operation work

                      Comment

                      Working...
                      X