facebook

Value object generation in relations

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #245906 Reply

    sutty_guha
    Member

    Hello everyone, I am a newbie in myEclipse.

    I will try to explain what I need to know with an example.

    I have the following tables :

    CREATE TABLE category (
    id NUMBER(20) CONSTRAINT pk_vsm_category PRIMARY KEY,
    name VARCHAR2(20) NOT NULL
    );

    CREATE TABLE category_attributes (
    category_id NUMBER(20) NOT NULL,
    label VARCHAR2(20) NOT NULL,
    CONSTRAINT pk_vsm_cat_attr PRIMARY KEY(category_id,label),
    CONSTRAINT rk_vsm_catattr_cat FOREIGN KEY(category_id) REFERENCES
    category(id) ON DELETE CASCADE
    );

    I have successfully created entity beans and relations using xdoclets for these two tables. However, I think my value object generation is not complete. I am getting the following value object :

    CategoryData class with members id and name, corresponding to the category table. I am expecting to see something like an ArrayList attributes to complete the description of the Category object. Since I am not getting this, I am writing a custom value object class that takes care of all the category data.

    Is it reasonable to expect CategoryData contain the target table columns, except for the foreign key? If yes, what xdoclet tag would achieve that?

    Thank you for your help.
    Suteertha

    #245920 Reply

    Riyad Kalla
    Member

    Suteertha,
    What you are asking is a straight-forward XDoclet question, not related to MyEclipse. As far as which tag to use, I’m sorry I don’t know.

    #245924 Reply

    sutty_guha
    Member

    Ok then, if someone would be kind enough to post the answer to this question, it would help this newbie take off the ground.

    Thanks again
    Suteertha

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Value object generation in relations

You must be logged in to post in the forum log in