how to get list A where not use in domain B?
Domain A
Class A{
String name
String code
}
Domain B
Class B{
A aaa
String description
}
example data:
**domain A**
id+versioin+name +code+|
1 | 0 |Bobby |bob |
2 | 0 |anto |ant |
3 | 0 |Jessica|jes |
4 | 0 |hera |her |
**domain B**
id+version|a_id|description + |
1 | 0 | 1 |this is bobby |
2 | 0 | 3 |this is jessic|
how can i get list from A where not used in B.
i tried this
def b = B.list()
def c = A.createCriteria()
def results = c.list {
not { 'in'(b) }
}
but fail..