Created
March 22, 2010 21:05
-
-
Save MarkMenard/340526 to your computer and use it in GitHub Desktop.
Example Groovy JPA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models | |
import javax.persistence.* | |
@Entity (name="Agreement") | |
@Table (name="agreement") | |
@EntityListeners ([QIdSetter.class]) | |
class AgreementJpaImpl extends QIdEntityImpl implements Agreement { | |
@ManyToOne (targetEntity=PartyJpaImpl.class) | |
Party party | |
@OneToMany (targetEntity=AgreementLineItemJpaImpl.class, mappedBy="agreement") | |
Set<AgreementLineItem> agreementLineItems = new HashSet<AgreementLineItem> () | |
public AgreementJpaImpl () { | |
super() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment