Grails 2.3.6 - Object mapping problem - Table without id column

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Grails 2.3.6 - Object mapping problem - Table without id column

medley
Hello,

Here is the context :
* GRAILS STS 3.5.0
* GRAILS 2.3.6
* Scaffold 2.0.2
* DBreserve 0.5
* Oracle DB 11g

I made a dbreverse of a database. In the database, some tables do not have a column named "id".
For example :
TABLE A (
ISO_CODE VARCHAR2(20) NOT NULL
);

The generated class looks like :
class A {

String isoCode

static mapping = {
id name: "isoCode", generator: "assigned"
version false
}

static constraints = {
isoCode maxSize: 20
}
}

First problem :
* for table A --> I can see the list of the items but it is not possible to edit them


Second problem :
* for table A --> If I want to add a new item, it shows me two fields in the form (id and isoCode even if my table contains only the field isoCode)

Thanks for the help
H.