Hi Tim,

I set the "updateable=false" property, but that didn't have any effect.

Here it is:
//      Mapped Fields

@TableGenerator(name="tblPdtcdeGenerator",schema="EBSTATUS",table="TBL_KEYGEN",pkColumnName="PRIMARY_KEY_COLUMN"
        
,valueColumnName="LAST_USED_ID",pkColumnValue="TBL_PDTCDE_ID",allocationSize=1)
                @Id
        
@GeneratedValue(strategy=GenerationType.TABLE,generator="tblPdtcdeGenerator")
                @Column(name = "PDTCDE_ID",nullable=false)
                private Integer pdtcdeId;    

        @Basic
        @Column(name = "PDTTYP_CDE",nullable=false,updatable=false) 
        private String pdttypCde;

        @Basic
        @Column(name = "PDT_CDE",nullable=false,updatable=false) 
        private String pdtCde;

        @Version
        @Column(name = "VRS_NBR")
        private Integer vrsNbr;


//      Mapped Relationships
        @OneToMany(mappedBy="tblPdtcde",fetch = FetchType.LAZY)
        private Collection<TblPdtbnfcde> tblPdtbnfcdes = new
ArrayList<TblPdtbnfcde>();

        @OneToMany(mappedBy="tblPdtcde",fetch = FetchType.LAZY)
        private Collection<TblScmpdt> tblScmpdts = new ArrayList<TblScmpdt>();
-- 
View this message in context: 
http://n2.nabble.com/How-to-prevent-OpenJPA-from-updating-immutable-entities--tp721855p722223.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to