[Hibernate-JIRA] Created: (ANN-416) Mapping of inheritance with several generic superclasses fails
by Amelin Dmitry (JIRA)
Mapping of inheritance with several generic superclasses fails
--------------------------------------------------------------
Key: ANN-416
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-416
Project: Hibernate Annotations
Type: Bug
Components: binder
Versions: 3.2.0.cr1
Environment: Hibernate: 3.2.0.cr2
Reporter: Amelin Dmitry
Attachments: testcase.zip
Classes and mapping code:
@MappedSuperclass
public abstract class OrganizationData<T extends OrganizationData> {
@OneToOne
private T update;
// Getters and Setters
...
}
@MappedSuperclass
public abstract class ContactData<T extends ContactData> extends OrganizationData<T> {
}
@Entity
public class Phone extends ContactData<Phone> {
// code
...
}
Full stack trace of any exception that occurs:
java.lang.IllegalStateException: Property update has an unbound type and no explicit target entity.
at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:938)
at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:788)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:614)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:353)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:265)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1205)
...
Important note:
If Phone class inherits OrganizationData directly, all works fine.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
18 years, 4 months
[Hibernate-JIRA] Created: (EJB-213) throw "java.lang.IllegalStateException: Property parent has an unbound type and no explicit target entity." on generic type
by Zheng.Duan (JIRA)
throw "java.lang.IllegalStateException: Property parent has an unbound type and no explicit target entity." on generic type
---------------------------------------------------------------------------------------------------------------------------
Key: EJB-213
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-213
Project: Hibernate Entity Manager
Type: Bug
Components: EntityManager
Versions: 3.2.0.cr1
Environment: Hibernate version: 3.2.0.cr2<br>
Mapping documents: Annotations 3.2.0.cr1
Reporter: Zheng.Duan
Attachments: jira.zip
Classes and mapping code: <br>
<code>
@MappedSuperclass
public abstract class Child<P extends Parent> {
@Id Long id;
@ManyToOne P parent;
...
}
@MappedSuperclass
public abstract class Parent<C extends Child> {
@Id @GeneratedValue Long id;
@MapKey @OneToMany(mappedBy="parent") Map<Long,C> children = new HashMap<Long,C>();
...
}
@Entity
public class ChildHierarchy1 extends Child<ParentHierarchy1> {
....
}
@Entity
public class ParentHierarchy1 extends Parent<ChildHierarchy1> {
....
}
@MappedSuperclass
public class ChildHierarchy2<P extends ParentHierarchy2> extends Child<P> {
....
}
@MappedSuperclass
public class ParentHierarchy2<C extends ChildHierarchy2> extends Parent<C> {
....
}
@Entity
public class ChildHierarchy22 extends ChildHierarchy2<ParentHierarchy22> {
....
}
@Entity
public class ParentHierarchy22 extends ParentHierarchy2<ChildHierarchy22> {
....
}
</code>
Full stack trace of exception:
<code>
Caused by: java.lang.IllegalStateException: Property parent has an unbound type and no explicit target entity.
at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:938)
at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:788)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:615)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:353)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:265)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1015)
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:751)
at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205)
... 4 more
</code>
if let <code>org.hibernate.cfg.AnnotationBinder.hasExplicitTargetEntity(XProperty p)</code> return <code>true</code>(it return <code>false</code> actually) then throw:<br>
<code>
Caused by: org.hibernate.AnnotationException: @OneToOne or @ManyToOne on zhengduan.entities.ChildHierarchy22.parent references an unknown entity: zhengduan.entities.ParentHierarchy2
at org.hibernate.cfg.FkSecondPass.doSecondPass(FkSecondPass.java:40)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:288)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1015)
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:751)
at org.hibernate.ejb.Ejb3Configuration.createFactory(Ejb3Configuration.java:151)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:205)
... 4 more
</code>
But it's wrong, <code>zhengduan.entities.ChildHierarchy22.parent</code> references <code>zhengduan.entities.ParentHierarchy22</code>, not <code>zhengduan.entities.ParentHierarchy2</code>!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
18 years, 4 months
[Hibernate-JIRA] Commented: (HHH-1476) Table.qualify does not handle dialect diferences
by Justin Kolb (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1476?page=c... ]
Justin Kolb commented on HHH-1476:
----------------------------------
Please close this issue.
Having to specify the user (catalog.user.table) instead of the shortened form of catalog..table is a work around for this issue. I was first opposed to this, but after thinking about it some more this is not an undue burden on a programmer to have to do this.
> Table.qualify does not handle dialect diferences
> ------------------------------------------------
>
> Key: HHH-1476
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1476
> Project: Hibernate3
> Type: Bug
> Components: core
> Environment: Hibernate 3.1.2
> SQL Server 2000
> Reporter: Justin Kolb
>
>
> The fix for HHH-699 caused me to discover that Hibernate isn't handling qualifying table names properly. It can be inferred from HHH-699 that not all databases are similar in this respect so I think this should be added to the dialect handling. From my short research I have the following 3 cases:
> SQL Server: database.owner.table
> MySQL: database.table (no schemas it seems)
> Most others: catalog.schema.table
> SQL Server also allows for "database..table" since it does not have schemas but does allow you to write queries that cross databases similar to how you can cross schemas in other database servers.
> Testing on Postgres though I determined that it does not allow "catalog..table" and will only accept "catalog.schema.table", so it dos not match up with SQL Server in this respect. If you write "catalog.table" it thinks you are trying to use a schema so it does not match up with MySQL in this respect.
> So right now only MySQL and SQL Server are the non standard compliant databases. Before 3.1 beta 1, SQL Server was handled correctly; then after that only MySQL was handled correctly.
> I'm not sure how much work it would take to make this change.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
18 years, 4 months
[Hibernate-JIRA] Commented: (ANN-298) ClassCastExcepton: java.lang.Long at org.hibernate.type.ComponentType.toLoggableString
by Emmanuel Bernard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-298?page=co... ]
Emmanuel Bernard commented on ANN-298:
--------------------------------------
Can you open a new bug report with a runnable test case attached, that will help me track down the issue
> ClassCastExcepton: java.lang.Long at org.hibernate.type.ComponentType.toLoggableString
> --------------------------------------------------------------------------------------
>
> Key: ANN-298
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-298
> Project: Hibernate Annotations
> Type: Bug
> Environment: JBoss 4.0..3 EJB3-RC5
> Hibernate 3.1.2
> Reporter: Steven Verze
>
>
> When loging is set the INFO I get the following exception:
> javax.ejb.EJBException: java.lang.ClassCastException: java.lang.Long
> at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
> at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
> at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:192)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:219)
> at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
> at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
> at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:580)
> at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:450)
> at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:290)
> at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:344)
> at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:202)
> Caused by: java.lang.ClassCastException: java.lang.Long
> at org.hibernate.type.ComponentType.toLoggableString(ComponentType.java:329)
> at org.hibernate.pretty.MessageHelper.collectionInfoString(MessageHelper.java:187)
> at org.hibernate.event.def.ReattachVisitor.removeCollection(ReattachVisitor.java:60)
> at org.hibernate.event.def.OnUpdateVisitor.processCollection(OnUpdateVisitor.java:46)
> at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:101)
> at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:61)
> at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55)
> at org.hibernate.event.def.AbstractVisitor.process(AbstractVisitor.java:123)
> at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:72)
> at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:790)
> at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:768)
> at org.hibernate.ejb.AbstractEntityManagerImpl.remove(AbstractEntityManagerImpl.java:155)
> at org.jboss.ejb3.entity.InjectedEntityManager.remove(InjectedEntityManager.java:151)
> at com.teleglobal.modules.authentic.services.AuthenticAccountServiceBean.remove(AuthenticAccountServiceBean.java:99)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
> at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
> at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:192)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:219)
> at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:107)
> at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
> at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:580)
> at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:450)
> at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:290)
> at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:344)
> at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:202)
> at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:163)
> at org.jboss.remoting.Client.invoke(Client.java:258)
> at org.jboss.remoting.Client.invoke(Client.java:221)
> at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
> at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
> at $Proxy1.remove(Unknown Source)
> at com.teleglobal.modules.authentic.servcies.AuthenticAccountServiceTest.tearDown(AuthenticAccountServiceTest.java:23)
> at junit.framework.TestCase.runBare(TestCase.java:130)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> The problem goes away when I turn logging down to WARN.
> I noticed that there was a similar bug (HHH-248) which was fixed in version 3.0.2
> This exception really only occured when I used ManyToOne relationship using the referencedColumnName attribute and only when I tried to remove AuthenticAccount .
> My entities follow:
> @Entity
> @Table(name="ACCOUNT")
> @SequenceGenerator(name="ACCOUNT_SEQUENCE", sequenceName="ACCOUNT_SEQUENCE")
> public class AuthenticAccount implements Serializable
> {
> @Id @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ACCOUNT_SEQUENCE")
> @Column(name="ACN_ID")
> private long id;
> @Column(name="ACN_ACCOUNT_NUMBER", unique=true)
> private String accountNumber;
> // Default values for all authentic test accounts
> @Column(name="ACN_BALANCE_1")
> private long balance1 = 5000;
> @Column(name="ACN_STATUS")
> private String status = "O";
> @Column(name="ACN_PRO_ID")
> private String proId = "11014";
> @Column(name="ACN_CUR_ID")
> private long curId = 826;
> @Column(name="ACN_AMT_ID_1")
> private long amountId1 = 2;
> @Column(name="ACN_AMT_ID_2")
> private long amountId2 = 1;
> @Column(name="ACN_BALANCE_2")
> private long balance2 = 0;
> @Column(name="ACN_LAST_BATCH_UPDATE_DATE")
> private Date lastBatchUpdateDate;
> @Column(name="ACN_LAST_FEP_HOST_TRACE_NBR")
> private long lastFepHostTraceNumber = 0;
> @Column(name="ACN_LAST_HOST_FEP_TRACE_NBR")
> private long lastHostFepTraceNumber = 118;
> @Column(name="ACN_BILL_PAYMENT_FLG")
> private int billPaymentFlag = 1;
> @Column(name="ACN_TRANSFER_FLG")
> private int transferFlag = 0;
> @Column(name="ACN_FUNCTIONS")
> private int functions = 1;
> @Column(name="ACN_FEP_HOST_SUM")
> private long fepHostSum = 110;
> @Column(name="ACN_HOST_FEP_SUM")
> private long hostFepSum = 811233;
> @OneToOne(mappedBy="account", cascade=CascadeType.ALL, fetch=FetchType.EAGER)
> private Card card;
> @OneToMany(mappedBy="account", cascade=CascadeType.ALL, fetch=FetchType.EAGER)
> @JoinColumn(name="AMS_ACCOUNT_NUM", referencedColumnName="ACN_ACCOUNT_NUMBER", nullable = false, unique = true)
> private List<AuthenticAccountMiniStatement> miniStatements;
>
> public AuthenticAccount()
> {
> lastBatchUpdateDate = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss a")
> .parse("09/06/2005 12:00:00 AM", new ParsePosition(0));
> card = new Card();
> miniStatements = new ArrayList<AuthenticAccountMiniStatement>();
> }
> public String getAccountNumber()
> {
> return accountNumber;
> }
> public void setAccountNumber(String accountNumber)
> {
> this.accountNumber = accountNumber;
> }
> public long getAmountId1()
> {
> return amountId1;
> }
> public void setAmountId1(long amountId1)
> {
> this.amountId1 = amountId1;
> }
> public long getAmountId2()
> {
> return amountId2;
> }
> public void setAmountId2(long amountId2)
> {
> this.amountId2 = amountId2;
> }
> public long getBalance1()
> {
> return balance1;
> }
> public void setBalance1(long balance1)
> {
> this.balance1 = balance1;
> }
> public long getBalance2()
> {
> return balance2;
> }
> public void setBalance2(long balance2)
> {
> this.balance2 = balance2;
> }
> public int getBillPaymentFlag()
> {
> return billPaymentFlag;
> }
> public void setBillPaymentFlag(int billPaymentFlag)
> {
> this.billPaymentFlag = billPaymentFlag;
> }
> public long getCurId()
> {
> return curId;
> }
> public void setCurId(long curId)
> {
> this.curId = curId;
> }
> public long getFepHostSum()
> {
> return fepHostSum;
> }
> public void setFepHostSum(long fepHostSum)
> {
> this.fepHostSum = fepHostSum;
> }
> public int getFunctions()
> {
> return functions;
> }
> public void setFunctions(int functions)
> {
> this.functions = functions;
> }
> public long getHostFepSum()
> {
> return hostFepSum;
> }
> public void setHostFepSum(long hostFepSum)
> {
> this.hostFepSum = hostFepSum;
> }
> public long getId()
> {
> return id;
> }
> public void setId(long id)
> {
> this.id = id;
> }
> public Date getLastBatchUpdateDate()
> {
> return lastBatchUpdateDate;
> }
> public void setLastBatchUpdateDate(Date lastBatchUpdateDate)
> {
> this.lastBatchUpdateDate = lastBatchUpdateDate;
> }
> public long getLastFepHostTraceNumber()
> {
> return lastFepHostTraceNumber;
> }
> public void setLastFepHostTraceNumber(long lastFepHostTraceNumber)
> {
> this.lastFepHostTraceNumber = lastFepHostTraceNumber;
> }
> public long getLastHostFepTraceNumber()
> {
> return lastHostFepTraceNumber;
> }
> public void setLastHostFepTraceNumber(long lastHostFepTraceNumber)
> {
> this.lastHostFepTraceNumber = lastHostFepTraceNumber;
> }
> public String getProId()
> {
> return proId;
> }
> public void setProId(String proId)
> {
> this.proId = proId;
> }
> public String getStatus()
> {
> return status;
> }
> public void setStatus(String status)
> {
> this.status = status;
> }
> public int getTransferFlag()
> {
> return transferFlag;
> }
> public void setTransferFlag(int transferFlag)
> {
> this.transferFlag = transferFlag;
> }
> public Card getCard()
> {
> return card;
> }
> public void setCard(Card card)
> {
> this.card = card;
> }
>
> public void addMiniStatement(AuthenticAccountMiniStatement miniStatement)
> {
> miniStatement.setAccount(this);
> this.miniStatements.add(miniStatement);
> }
>
> public void removeMiniStatement(AuthenticAccountMiniStatement miniStatement)
> {
> this.miniStatements.remove(miniStatement);
> }
> public List<AuthenticAccountMiniStatement> getMiniStatements()
> {
> return miniStatements;
> }
> public void setMiniStatements(List<AuthenticAccountMiniStatement> miniStatements)
> {
> this.miniStatements = miniStatements;
> }
> }
> @Entity
> @Table(name = "ACCOUNT_MINI_STATEMENT")
> @SequenceGenerator(name="MINI_STATEMENT_SEQUENCE", sequenceName="MINI_STATEMENT_SEQUENCE")
> public class AuthenticAccountMiniStatement implements Serializable
> {
> @Id @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="MINI_STATEMENT_SEQUENCE")
> @Column(name="AMS_TXN_SEQ")
> private long id;
> @Column(name="AMS_TXN_CODE")
> private String transactionDescription = "LOAD";
> @Column(name="AMS_TXN_DATE")
> private Date transactionDate = new Date();
> @Column(name="AMS_TXN_AMOUNT")
> private long transactionAmount = 10;
> @Column(name="AMS_TRL_BUSINESS_DATE")
> private Date transactionLogBusinessDate = new Date();
> @Column(name="AMS_TRL_ID")
> private long transactionLogId = 34610;
> @Column(name="AMS_GRP_SEQ")
> private long groupSequence = 1;
> @ManyToOne(fetch=FetchType.EAGER)
> @JoinColumn(name="AMS_ACCOUNT_NUM", referencedColumnName="ACN_ACCOUNT_NUMBER", nullable = false, unique = true)
> private AuthenticAccount account;
>
> public AuthenticAccountMiniStatement()
> {
> }
>
> public long getTransactionAmount()
> {
> return transactionAmount;
> }
>
> public void setTransactionAmount(long transactionAmount)
> {
> this.transactionAmount = transactionAmount;
> }
>
> public Date getTransactionDate()
> {
> return transactionDate;
> }
>
> public void setTransactionDate(Date transactionDate)
> {
> this.transactionDate = transactionDate;
> }
>
> public String getTransactionDescription()
> {
> return transactionDescription;
> }
>
> public void setTransactionDescription(String transactionDescription)
> {
> this.transactionDescription = transactionDescription;
> }
>
> public long getGroupSequence()
> {
> return groupSequence;
> }
>
> public void setGroupSequence(long groupSequence)
> {
> this.groupSequence = groupSequence;
> }
>
> public long getId()
> {
> return id;
> }
>
> public void setId(long id)
> {
> this.id = id;
> }
>
> public Date getTransactionLogBusinessDate()
> {
> return transactionLogBusinessDate;
> }
>
> public void setTransactionLogBusinessDate(Date transactionLogBusinessDate)
> {
> this.transactionLogBusinessDate = transactionLogBusinessDate;
> }
>
> public long getTransactionLogId()
> {
> return transactionLogId;
> }
>
> public void setTransactionLogId(long transactionLogId)
> {
> this.transactionLogId = transactionLogId;
> }
> public AuthenticAccount getAccount()
> {
> return account;
> }
> public void setAccount(AuthenticAccount account)
> {
> this.account = account;
> }
> }
> @Entity
> @Table(name="CARD")
> @SequenceGenerator(name="CARD_SEQUENCE", sequenceName="CARD_SEQUENCE")
> public class Card implements Serializable
> {
> @Id @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="CARD_SEQUENCE")
> @Column(name="CRD_ID")
> private long id;
> @Column(name="CRD_PAN")
> private String primaryAccountNumber;
> @Column(name="CRD_STATUS_1")
> private String status1 = "A";
> @Column(name="CRD_CURRENT_PVV")
> private long currentPvv = 0;
> @Column(name="CRD_PIN_RETRY_COUNT")
> private long pinRetryCount = 0;
> @Column(name="CRD_CUSTOM_INDEX_1")
> private String customIndex1 = "GC";
> // Default values for all authentic test cards
> @Column(name="CRD_CARD_SEQUENCE_NBR")
> private long cardSequenceNumber = 0;
> @Column(name="CRD_CPD_ID")
> private long cpdId = 250;
> @Column(name="CRD_LAST_SOURCE")
> private String lastSource = "U";
> @Column(name="CRD_FUNCTIONS")
> private int functions = 1;
> @Column(name="CRD_CURRENT_PIN_OFFSET")
> private String currentPinOffset = "0";
> @Column(name="CRD_ISSUE_DATE_1")
> private Date issueDate1;
> @Column(name="CRD_EXPIRY_DATE_1")
> private Date expiryDate1;
> @Column(name="CRD_EXPIRY_DATE_2")
> private Date expiryDate2;
> @Column(name="CRD_STATUS_1_DATE")
> private Date status1Date;
> @ManyToOne(fetch=FetchType.EAGER)
> @JoinColumn(name="CRD_PRIMARY_ACN_ID", nullable=false, unique=true)
> private AuthenticAccount account;
> public Card()
> {
> this.issueDate1 = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss a").parse("09/06/2005 12:00:00 AM", new ParsePosition(0));
> this.expiryDate1 = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss a").parse("01/06/2015 12:00:00 AM", new ParsePosition(0));
> this.expiryDate2 = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss a").parse("01/06/2015 12:00:00 AM", new ParsePosition(0));
> this.status1Date = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss a").parse("09/06/2005 12:00:00 AM", new ParsePosition(0));
> }
> public String getPrimaryAccountNumber()
> {
> return primaryAccountNumber;
> }
> public void setPrimaryAccountNumber(String primaryAccountNumber)
> {
> this.primaryAccountNumber = primaryAccountNumber;
> }
> public long getCpdId()
> {
> return cpdId;
> }
> public void setCpdId(long cpdId)
> {
> this.cpdId = cpdId;
> }
> public String getCurrentPinOffset()
> {
> return currentPinOffset;
> }
> public void setCurrentPinOffset(String currentPinOffset)
> {
> this.currentPinOffset = currentPinOffset;
> }
> public long getCurrentPvv()
> {
> return currentPvv;
> }
> public void setCurrentPvv(long currentPvv)
> {
> this.currentPvv = currentPvv;
> }
> public String getCustomIndex1()
> {
> return customIndex1;
> }
> public void setCustomIndex1(String customIndex1)
> {
> this.customIndex1 = customIndex1;
> }
> public Date getExpiryDate1()
> {
> return expiryDate1;
> }
> public void setExpiryDate1(Date expiryDate1)
> {
> this.expiryDate1 = expiryDate1;
> }
> public Date getExpiryDate2()
> {
> return expiryDate2;
> }
> public void setExpiryDate2(Date expiryDate2)
> {
> this.expiryDate2 = expiryDate2;
> }
> public int getFunctions()
> {
> return functions;
> }
> public void setFunctions(int functions)
> {
> this.functions = functions;
> }
> public long getId()
> {
> return id;
> }
> public void setId(long id)
> {
> this.id = id;
> }
> public Date getIssueDate1()
> {
> return issueDate1;
> }
> public void setIssueDate1(Date issueDate1)
> {
> this.issueDate1 = issueDate1;
> }
> public String getLastSource()
> {
> return lastSource;
> }
> public void setLastSource(String lastSource)
> {
> this.lastSource = lastSource;
> }
> public long getPinRetryCount()
> {
> return pinRetryCount;
> }
> public void setPinRetryCount(long pinRetryCount)
> {
> this.pinRetryCount = pinRetryCount;
> }
> public long getCardSequenceNumber()
> {
> return cardSequenceNumber;
> }
> public void setCardSequenceNumber(long cardSequenceNumber)
> {
> this.cardSequenceNumber = cardSequenceNumber;
> }
> public String getStatus1()
> {
> return status1;
> }
> public void setStatus1(String status1)
> {
> this.status1 = status1;
> }
> public Date getStatus1Date()
> {
> return status1Date;
> }
> public void setStatus1Date(Date status1Date)
> {
> this.status1Date = status1Date;
> }
> public AuthenticAccount getAccount()
> {
> return account;
> }
> public void setAccount(AuthenticAccount account)
> {
> this.account = account;
> }
> }
> Further more, when I try to remove an AUthentic entity (with logging set to WARN), I find that the AuthenticMiniStatements
> are not removed. This probably should be raised as another bug.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
18 years, 4 months