grails - How to set my computerId into primary key? -


here's code in domain. wanted set computerid primary key. still display on table(index). thanks

package com.data  class computerinformation {      string computerid;     string computername;     string status;     string location;     string serial;     string monitorserial;     string keyboardserial;     string mouseserial;     string cpuserial;     string avrserial;     string harddiskserial;      static constraints = {         computerid(unique:true)         computername(blank:false)         status(blank:false)         location(blank:false)         serial(blank:false)         monitorserial(blank:false)         keyboardserial(blank:false)         mouseserial(blank:false)         cpuserial(blank:false)         avrserial(blank:false)         harddiskserial(blank:false)     } } 

use this,

static mapping = {         id name: 'computerid' } 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -