Home How to implement Identity generator with groovy domain
Reply: 0

How to implement Identity generator with groovy domain

user5037
1#
user5037 Published in September 20, 2018, 4:52 pm

I have to create groovy domain using the hibernate mapping file, Here I'm writing the hibernate mapping file, I do not know that how to use identity generator in groovy and also there is a many to one mapping with UserImpl Please help to create a groovy domain

<hibernate-mapping>
<class name="User" table="user">

    <id name="id" column="id" type="java.lang.Long">
        <generator class="identity"/>
    </id>
    <property column="password" name="password" type="java.lang.String" />
    <property column="data_inserimento" name="dataInserimento" 
    type="java.util.Date" not-null="true" />
    <property column="giorni_validita" name="giorniValidita" type="int" not-
     null="true"/>
    <properties name="ultimaPassword">
        <many-to-one class="UserImpl" column="id_utente" 
        name="utente"/>
        <property name="ultima" type="java.lang.Boolean"/>
    </properties>

 </class>
 </hibernate-mapping>
share|improve this question

1 Answer 1

active oldest votes
up vote 0 down vote
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.336129 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO