Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » insert always null on embedded fields
insert always null on embedded fields [message #1048682] Wed, 24 April 2013 20:35 Go to next message
Daniel Tavares is currently offline Daniel Tavares
Messages: 1
Registered: April 2013
Junior Member
Hello,

when i insert an object with a embedded it always insert with null values. See:

	
Caused by:(3) java.lang.RuntimeException Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: não é possível inserir NULL em ("T_SJS_DOL_DBA"."DOL_REGISTRO"."CTR_USU_INC")

Error Code: 1400
Call: INSERT INTO DOL_REGISTRO (NRO_INT_REGISTRO, NRO_PROTOC_VINC, NRO_RG_OPE_DEF, TXT_MOTIVO_INDEF, TP_ACIDENTE, NRO_PROTOCOLO, NRO_OCO_ANO_VINC, NRO_RG_OPERADOR, DTH_DEFERIMENTO, ORIGEM_REG, TP_INFRACAO, TXT_MOTIVO_ABA6, TXT_MOTIVO_ABA7, TXT_MOTIVO_ABA4, NRO_OCO_ANO, TXT_MOTIVO_ABA5, TXT_HISTORICOCOMPL, TXT_MOTIVO_ABA2, TXT_MOTIVO_ABA3, TXT_MOTIVO_ABA1, NRO_PROTOCOLO_ANT, DTH_COMUNICACAO, DTH_FATO, NRO_AUTENTICACAO, DTH_OPE_ATU, NRO_OCO_NRO_VINC, TP_LOCAL, NRO_OCO_ORG_VINC, NRO_OCO_ORGAO, IND_STATUS_INT_ABA5, IND_STATUS_INT_ABA4, IND_STATUS_INT_ABA3, IND_STATUS_INT_ABA2, IND_STATUS_INT_ABA7, IND_STATUS_INT_ABA6, CTR_EST_ATU, IND_STATUS_INT_ABA1, NRO_OCO_NUMERO, TP_SITUACAO, IND_STATUS_ABA7, IND_STATUS_ABA5, IND_STATUS_ABA6, IND_STATUS_ABA3, IND_STATUS_ABA4, IND_STATUS_ABA1, IND_STATUS_ABA2, TP_LOCAL_ESPEC, TXT_HISTORICO, NRO_INT_ADENDO, NRO_INT_TIPOREG, NRO_INT_ENDERECO, CTR_USU_INC, CTR_DTH_ATU, CTR_USU_ATU, CTR_DTH_INC, CTR_NRO_IP_INC, CTR_NRO_IP_ATU) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
	bind => [371468, null, null, null, null, 201304248213535, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null, 2013-04-24 00:00:00.0, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, 2, null, null, null, null, null, null, null]


Class:


@Entity
@Table(name = "DOL_REGISTRO")
public class RegistroED
...
	@Embedded
	private ControlePropriedades controle;
...



@Embeddable
public class ControlePropriedades implements Serializable {

  private static final long serialVersionUID = 1L;

@Column(name="CTR_USU_INC")
  private Long ctrUsuInc;

...


what am i doing wrong?
Re: insert always null on embedded fields [message #1049250 is a reply to message #1048682] Thu, 25 April 2013 15:15 Go to previous message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1034
Registered: July 2009
Senior Member
Can you show how you create the entity and set its embeddable and the value and persist?

Best Regards,
Chris
Previous Topic:Eclipse Link insert/update performance issue
Next Topic:2 or more constraints when doing anyOf
Goto Forum:
  


Current Time: Fri Oct 24 23:07:18 GMT 2014

Powered by FUDForum. Page generated in 0.01831 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software