Todd O'Bryan <toddobrya..ac.com> wrote:
> 1. Is there an Eclipse plugin for Cayenne, yet? If not, how do you use
> Cayenne with Eclipse. Can you just set the directory for code
> generation/xml files to be saved into as the src folder in an Eclipse
> project and then Refresh in Eclipse when you make changes, or is there
> some subtlety involved?
Yep. That's really all that's necessary.
I have set up an ant task to generate my code files from modeler templates.
I save my xml files into WEB-INF, but you could put them whereever you like.
> 3. Am I correct in my current understanding of relationships which is
> as follows: a relationship connects one field of one table to a field
> of another table. You have to specify an attribute of one table to hold
> an attribute value (probably a PK value) of another table. Then you
> additionally have to specify that said attribute represents a
> relationship. Is that right? I kept assuming that if I specified a
> relationship the tool should be smart enough to stick in any extra
> fields needed to effect the relationship for me, but I'm sensing that's
> not right...
No, you've got it right. The only semantical correction I'd make is that a
relation connects one field of one table to another table (rather than to
another table's field).
For example, in a Table/Entity Book, you could specify DB attribute
AUTHOR_ID which is a foreign key to the primary key of an Author
Table/Entity. You'd create an ObjAttribute of author, and from then on,
you'd just reference "book.getAuthor()" to get back an Author Object, and
"book.setAuthor(Author authorObject)" to set an author object.
This archive was generated by hypermail 2.0.0 : Sun Apr 04 2004 - 12:17:22 EDT