|
Hibernate example source code file (TvProgramIdClass.java)
The Hibernate TvProgramIdClass.java source code//$Id$ package org.hibernate.test.annotations.cid; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.IdClass; import javax.persistence.JoinColumn; import javax.persistence.PrimaryKeyJoinColumn; import javax.persistence.SecondaryTable; import javax.persistence.Temporal; import javax.persistence.TemporalType; @Entity @SecondaryTable( name = "TV_PROGRAM_IDCLASS", pkJoinColumns = { @PrimaryKeyJoinColumn( name = "CHANNEL_ID" ), @PrimaryKeyJoinColumn( name = "PRESENTER_NAME" ) } ) @IdClass( TvMagazinPk.class ) public class TvProgramIdClass { @Id @JoinColumn(nullable=false) public Channel channel; @Id @JoinColumn(nullable=false) public Presenter presenter; @Temporal( TemporalType.TIME ) Date time; @Column( name = "TXT", table = "TV_PROGRAM_IDCLASS" ) public String text; } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate TvProgramIdClass.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.