Author: epbernard
Date: 2009-04-23 01:56:50 -0400 (Thu, 23 Apr 2009)
New Revision: 16414
Modified:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/EntityTest.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/Sky.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/join/Cat.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/join/JoinTest.java
Log:
ANN-822 mark unique columns as nullable=false
Modified:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/EntityTest.java
===================================================================
---
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/EntityTest.java 2009-04-22
21:37:21 UTC (rev 16413)
+++
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/EntityTest.java 2009-04-23
05:56:50 UTC (rev 16414)
@@ -260,6 +260,8 @@
sky.id = new Long( 1 );
sky.color = "black";
Sky.area = "Paris";
+ sky.day = "23";
+ sky.month = "1";
s.save( sky );
tx.commit();
s.close();
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/Sky.java
===================================================================
---
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/Sky.java 2009-04-22
21:37:21 UTC (rev 16413)
+++
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/Sky.java 2009-04-23
05:56:50 UTC (rev 16414)
@@ -18,10 +18,11 @@
public class Sky implements Serializable {
@Id
protected Long id;
- @Column(unique = true, columnDefinition = "varchar(250)")
+ @Column(unique = true, columnDefinition = "varchar(250)", nullable = false)
protected String color;
+ @Column(nullable = false)
protected String day;
- @Column(name = "MONTH")
+ @Column(name = "MONTH", nullable = false)
protected String month;
static protected String area;
}
Modified:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/join/Cat.java
===================================================================
---
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/join/Cat.java 2009-04-22
21:37:21 UTC (rev 16413)
+++
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/join/Cat.java 2009-04-23
05:56:50 UTC (rev 16414)
@@ -83,7 +83,7 @@
return storyPart1;
}
- @Column(table = "Cat2")
+ @Column(table = "Cat2", nullable = false)
public String getStoryPart2() {
return storyPart2;
}
Modified:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/join/JoinTest.java
===================================================================
---
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/join/JoinTest.java 2009-04-22
21:37:21 UTC (rev 16413)
+++
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/join/JoinTest.java 2009-04-23
05:56:50 UTC (rev 16414)
@@ -95,6 +95,7 @@
Life life = new Life();
Cat cat = new Cat();
cat.setName( "kitty" );
+ cat.setStoryPart2( "and the story continues" );
life.duration = 15;
life.fullDescription = "Long long description";
life.owner = cat;
Show replies by date