1 Reply Latest reply on Nov 17, 2005 6:44 AM by Emmanuel Bernard

    Table Per CLass - ID

    Dave Chen Master

      For table per class, if I use AUTO for id generation,
      @Id(generate = GeneratorType.AUTO)

      I got the following deployment exception:

      org.hibernate.MappingException: Cannot use identity column key generation with <union-subclass> mapping for: example.Cat.

      If I change it to Table:
      @Id(generate = GeneratorType.Table)
      It works fine.

      All DBs support AUTO. For Table Per class, which one should I use? There are some others: Identity, sequence, none.

      I tried to look for docs, none can be found on internet. The Javadoc
      is really not very nice, no docs, just names. :-)