Code example for Column

Methods: isNullable

0
 
	@Test
	public void testDDLDisabled() { 
		PersistentClass classMapping = configuration().getClassMapping( Address.class.getName() );
		Column countryColumn = (Column) classMapping.getProperty( "country" ).getColumnIterator().next();
		assertTrue( "DDL constraints are applied", countryColumn.isNullable() );
	} 
 
	@Override 
	protected void configure(Configuration cfg) {
		super.configure( cfg );
		cfg.setProperty( "javax.persistence.validation.mode", "none" );
	} 
 
	@Override 
	protected Class<?>[] getAnnotatedClasses() {
		return new Class<?>[] {
				Address.class,
				CupHolder.class 
		};