
Untitled
By: a guest on
Aug 6th, 2012 | syntax:
None | size: 0.63 KB | hits: 18 | expires: Never
Employee not found with id null grails
class Employee {
Integer empId
String firstName
String lastName
static constraints = {
empId()
firstName()
lastName()
}
static mapping = {
id generator:'assigned', name:'empId'
version false
}
}
static constraints = {
empId()
firstName()
lastName()
}
static mapping = {
id generator:'assigned', name:'empId', column: 'emp_id'
version false
}
public void setEmpId(Long empId){
this.empId = empId
this.id = empId
}
id name: 'customId', generator: 'sequence', params: [sequence:'some_sequence']