ANN-818 - @DiscriminatorFormula for an integer column with default discriminator type causes failure for DB2/Sybase

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@16304 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Gail Badner 2009-04-11 04:43:19 +00:00
parent 73e0c3dad2
commit d653efeceb
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,8 @@ package org.hibernate.test.annotations.inheritance.singletable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
@ -14,6 +16,7 @@ import org.hibernate.annotations.DiscriminatorFormula;
* @author Emmanuel Bernard
*/
@Entity
@DiscriminatorColumn(discriminatorType=DiscriminatorType.INTEGER)
@DiscriminatorFormula("case when zik_type is null then 0 else zik_type end")
@Table(uniqueConstraints = @UniqueConstraint(columnNames = {"avgBeat", "starred"} ))
public abstract class Music {