| time |
nick |
message |
13:40 |
<mraible> |
I'm trying to get a simple Grails one-to-many working with User + Address. I don't see anything wrong with my code, do you? http://rifers.org/paste/show/7692 |
13:41 |
<mraible> |
My test (http://rifers.org/paste/show/7693) is failing with An association from the table user refers to an unmapped class: Address |
13:53 |
<dork981> |
hi anybody there in this chat room |
13:53 |
<dork981> |
?? |
22:18 |
<TomTo> |
hi |
22:19 |
<TomTo> |
can anybody help for me in gorm mapping? |
22:19 |
<TomTo> |
i would like to use not the default column as id |
22:20 |
<TomTo> |
i tried idMapping, but it did not worked for me |
22:22 |
<TomTo> |
It's my domain class: class Telepules { Integer iranyitoszam String nev static constraints = { iranyitoszam(blank:false, unique:true, min:1000, max:9999) nev(blank:false, maxSize:50) } static mapping = { id{ idMapping(name:'iranyitoszam', column:'iranyitoszam', unsavedValue:0) generator(class:'assign') } } String toString() {"${this.iranyitoszam} - ${this.nev}"}} |
22:25 |
<TomTo> |
ah, there is a mistake, the generator class is assigned, but it's not working :( |
23:33 |
<codyc> |
So, somewhere in the docs I saw a closure used to initialize an object's field(s) instead of a constructor. |
23:33 |
<codyc> |
and I tried it and it worked. |
23:33 |
<codyc> |
but I can't find where that's documented to read up on further details. |
23:34 |
<codyc> |
Can someone point me to the right page? |
23:34 |
<codyc> |
I'm really liking Groovy. Might convert me from Python. :p |
23:38 |
<codyc> |
that's me, in case someone happens to answer while i drive home. :p |