这是 Intershop 代码生成器的正常和预期行为吗?例如,如果您有以下接口 Test.edl:
cartridge interface Test extends PersistentObject
{
/*
* Product ID
*/
attribute productID : string required;
/*
* Test2 UUID
*/
attribute test2UUID: uuid required;
/**
* Test2 relation
*/
relation test2: Test2[1..1] readonly;
/*
* Product relation
*/
relation product : Product[1..1] readonly;
}
cartridge interface Test2 extends PersistentObject
{
relation test2values : Test[0..n] readonly;
}
它是 PO 对象:
orm class TestPO extends PersistentObjectPO implements Test table "Test"
{
/**
* Declare alternate key.
*/
alternate key (test2UUID, productID, domainID);
/**
* Holds link to test2.
*/
attribute test2UUID: uuid required;
/**
* Holds link to product.
*/
attribute productID : uuid required;
/**
* Relation to test2 PO
*/
relation test2PO : Test2PO[1..1] inverse testPOs implements test2 readonly
{
foreign key(test2UUID) -> (UUID);
}
/**
* Relation to product PO
*/
dependency product : ProductPO
{
foreign key(productID);
}
}
orm class Test2PO extends PersistentObjectPO implements Test2 table "Test2" {
/**
* Discount values relation
*/
relation testPOs : TestPO[0..n] inverse test2PO implements test2values delete default;
}
现在,如果您为接口和 orm 类生成代码。您将使用方法 setTest2UUID(String aValue) 进入接口 Test.java,但没有它会生成实现 TestPO.java,并且由于以下编译器错误:
“TestPO 类型必须实现继承的抽象方法 Test.setTest2UUID(String)”
我们在这里做错了什么还是 Intershop 代码生成器中的错误?
谢谢您的回答!