
|
If you were logged in you would be able to see more operations.
|
|
EJB Cartridge
Created: 27/Jul/07 11:31 AM
Updated: 27/Jul/07 11:31 AM
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
None
|
|
|
Environment:
|
Application Server: JBoss 4.2.0
|
|
s. Forum http://galaxy.andromda.org/forum/viewtopic.php?t=4626&start=0&postdays=0&postorder=asc
I am using EJB3-Cartridge to generate data access layer for my application. The domain model contains the datatype money, which I want to generate as Embedded Value Object. Money datatype should have additionally some methods like add() and changeCurrency(). EJB3-Cartridge generate this classes:
Code:
public abstract class Money
implements java.io.Serializable
{
...
}
Code:
public class MoneyImpl
extends Money
{
...
}
The entities using the money datatype reference the abstract class money
Code:
public class Bill
implements java.io.Serializable
{
...
@javax.persistence.Embedded
public Money getAmount()
{
return _amount;
}
}
If I try to get the entity from the database the following error occurs:
javax.persistence.PersistenceException: org.hibernate.InstantiationException: Cannot instantiate abstract class or interface: Money
Is it possible to generate, like by entities, an embedded abstract class MoneyEmbedded and embeddable class Money, where the additionally methods should be implemented?
|
|
|
There are no comments yet on this issue.
|
| |
|
|