facebook

Problem with Scaffolding a Foreign Key

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #316907 Reply

    DynDasE
    Member

    I have problem with Scaffolding a Foreign Key.

    When we want to record that field for the parent table , the table will always create a new record for child’s table. ( Because Scaffolding only offers new command )

    We only want to save the child’s table’s id into parent’s field.
    What can we do to list an existing child’s id and save it into parent’s ?

    #317030 Reply

    jkennedy
    Member

    The scaffolding is currently designed to give you a good start for building an application, but it does not build out the case for establishing relationships between existing entities (it does for GWT, but not for other UI types yet).

    Your next step then would be to build a drop down component or other kind of “picker” for your existing children objects, and then modify the save handler for the parent object to refetch the existing child from the child DAO and then add the child to the parent’s relationship.

    Let me know which UI technology (Flex, MVC, etc) you are using and if you need additional assistance.

    Thanks,
    Jack

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Problem with Scaffolding a Foreign Key

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