cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cay dabbler <x...@ouvip.com>
Subject Re: Missing DbAttribute
Date Thu, 27 Jul 2006 17:53:01 GMT

Andrus, 
Thanks for your quick reply. I am frustrated with a whole host of
velocity2ejb generators.  I find Cayenne more useful for my purpose even
though it does not make grand claims - as the other generators do. 

I am using Cayenne to generate EJB 3.0, JSF and Webservice – true, and a
whole load of other stuff. I am particularly attracted to Cayenne
inheritance facilities. 

I do want to map DbAttributes to the corresponding ObjAttributes, but I
don't know what I am doing wrong. 

Scenario:
1 In my database schema
a)  I have  CONSTRAINT FK_FOO1_TABLE_1 FOREIGN KEY(ID) REFERENCES
FOO2_TABLE(D));

2. In Cayenne
a) I make Foo1 the superclass of Foo2 
b). FOO1_TABLE has a row defined:  NAME=toFoo2Table , TARGET=FOO2_TABLE, To
Dep PK= true;

Problem:
I don't know why (2b) is necessary. Anyway, I deleted the row and that's
when my problem started. If I don't remove it, I get something like:

Class Foo1{
private  Foo2  toFoo2; // UGLY, DON'T WANT THIS
}
Class Foo2 extends Foo1{
}

One more thing:
In the Cayenne API doc, The ObjAttribute class has: 
DbAttribute getDbAttribute();

It would be nice to have in the DBAttribute: class 
ObjAttribute  getObjAttribute();

Phew!

-- 
View this message in context: http://www.nabble.com/Missing-DbAttribute-tf2008259.html#a5526020
Sent from the Cayenne - User forum at Nabble.com.


Mime
View raw message