join.setInverse( matchingTable.inverse() ); join.setOptional( matchingTable.optional() ); if ( !BinderHelper.isEmptyAnnotationValue( matchingTable.sqlInsert().sql() ) ) { join.setCustomSQLInsert( matchingTable.sqlInsert().sql().trim(), matchingTable.sqlInsert().callable(), ExecuteUpdateResultCheckStyle.fromExternalName( matchingTable.sqlInsert().check().toString().toLowerCase(Locale.ROOT)
@SQLInsert( sql="INSERT INTO CHAOS(name, nick_name, chaos_size, id) VALUES(upper(?),?,?,?)") @SQLUpdate( sql="UPDATE CHAOS SET name = upper(?), nick_name = ?, chaos_size = ? WHERE id = ?") @SQLDelete( sql="DELETE CHAOS WHERE id = ?") @SQLInsert( sql="UPDATE CASIMIR_PARTICULE SET chaos_fk = ? where id = ?") @SQLDelete( sql="UPDATE CASIMIR_PARTICULE SET chaos_fk = null where id = ?") private Set<CasimirParticle> particles = new HashSet<CasimirParticle>();
@Entity(name = "CardWithCustomSQL") @Persister( impl = SingleTableEntityPersister.class ) @Loader(namedQuery = "find_foo_by_id") @NamedNativeQuery( name = "find_foo_by_id", query = "SELECT id, name FROM {h-schema}FOO WHERE id = ?", resultClass = CustomEntity.class ) @SQLInsert(sql = "INSERT INTO {h-schema}FOO (name, id) VALUES (?, ?)") @SQLDelete(sql = "DELETE FROM {h-schema}FOO WHERE id = ?", check = ResultCheckStyle.COUNT) @SQLUpdate(sql = "UPDATE {h-schema}FOO SET name = ? WHERE id = ? ") public static class CustomEntity { @Id public Integer id; private String name; }
@Entity(name = "Person") @SQLInsert( sql = "INSERT INTO person (name, id, valid) VALUES (?, ?, 1) ", check = ResultCheckStyle.COUNT
join.setInverse( matchingTable.inverse() ); join.setOptional( matchingTable.optional() ); if ( !BinderHelper.isDefault( matchingTable.sqlInsert().sql() ) ) { join.setCustomSQLInsert( matchingTable.sqlInsert().sql().trim(), matchingTable.sqlInsert().callable(), ExecuteUpdateResultCheckStyle.parse( matchingTable.sqlInsert().check().toString().toLowerCase() ) );
@Entity(name = "Person") @Table(name = "person") @SQLInsert( sql = "INSERT INTO person (name, id, valid) VALUES (?, ?, true) " @org.hibernate.annotations.Table( appliesTo = "person_details", sqlInsert = @SQLInsert( sql = "INSERT INTO person_details (image, person_id, valid) VALUES (?, ?, true) ", check = ResultCheckStyle.COUNT
join.setInverse( matchingTable.inverse() ); join.setOptional( matchingTable.optional() ); if ( !BinderHelper.isEmptyAnnotationValue( matchingTable.sqlInsert().sql() ) ) { join.setCustomSQLInsert( matchingTable.sqlInsert().sql().trim(), matchingTable.sqlInsert().callable(), ExecuteUpdateResultCheckStyle.fromExternalName( matchingTable.sqlInsert().check().toString().toLowerCase()
columnNames = "secondName"), comment = "My cat table" ) @Table(appliesTo = "Cat2", foreignKey = @ForeignKey(name="FK_CAT2_CAT"), fetch = FetchMode.SELECT, sqlInsert=@SQLInsert(sql="insert into Cat2(storyPart2, id) values(upper(?), ?)") ) public class Cat implements Serializable {
join.setInverse( matchingTable.inverse() ); join.setOptional( matchingTable.optional() ); if ( !BinderHelper.isEmptyAnnotationValue( matchingTable.sqlInsert().sql() ) ) { join.setCustomSQLInsert( matchingTable.sqlInsert().sql().trim(), matchingTable.sqlInsert().callable(), ExecuteUpdateResultCheckStyle.fromExternalName( matchingTable.sqlInsert().check().toString().toLowerCase()
@Entity(name = "Book") @Table(name = "book") @SQLInsert( sql = "insert into book (title, publisher_id, version) values (?, ?, ?)") public static class Book implements Serializable { @EmbeddedId private EmbeddedKey key; private String title; @Version @Column(insertable = false) private Integer version; public EmbeddedKey getKey() { return key; } public void setKey(EmbeddedKey key) { this.key = key; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } }
join.setInverse( matchingTable.inverse() ); join.setOptional( matchingTable.optional() ); if ( !BinderHelper.isEmptyAnnotationValue( matchingTable.sqlInsert().sql() ) ) { join.setCustomSQLInsert( matchingTable.sqlInsert().sql().trim(), matchingTable.sqlInsert().callable(), ExecuteUpdateResultCheckStyle.fromExternalName( matchingTable.sqlInsert().check().toString().toLowerCase(Locale.ROOT)
@Entity(name = "Person") @SQLInsert( sql = "INSERT INTO person (name, id, valid) VALUES (?, ?, 1) ", check = ResultCheckStyle.COUNT