Results 1 to 3 of 3

Thread: PetClinic mod basics help please

  1. #1
    Join Date
    Mar 2005
    Location
    Liverpool, UK
    Posts
    21

    Default PetClinic mod basics help please

    Hi everyone,
    I have recently been asked to familiarise myself with Spring, and thought it would be a good idea to try making some changes to it to see what interacts with what.

    I thought it would be straight forward enough to add a reference to a Vet for each Visit.

    How many files do I have to edit?! It seems that simply adding a field to the DB requires edits to many files. (This is before even trying to manually add a visit.)

    The help I need should be quite high-level, but I may have further questions later on.

    Genuinely any help/tips/suggestions are muchly appreciated.
    [Newbie to Spring!]

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    To change the DB you would need to change the DDL. That's not necessary for a relationship where there's already a foreign key.

    To change a reference you would need to edit the Java objects and the mappings files if you're using the Hibernate or iBATIS variant. With the JDBC version you would need to change the SQL queries etc and the binding in the Java code.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Mar 2005
    Location
    Liverpool, UK
    Posts
    21

    Default

    Thanks Rod. (*bows to creator of current universe*)

    After much struggling* I went for a simpler modification:
    Added a 'Colour' field to the Pet (was thinking of 'Tabby' etc for cats!)

    I've managed to do this, though quite likely in a long-winded fashion.

    A total of 13 files edited, almost definately including files which aren't even touched by the current implementation.

    What's the minimum number of files you'd expect me to need to edit?
    (not including test files)

    Many thanks, j

    *- not all this time btw!
    [Newbie to Spring!]

Similar Threads

  1. Replies: 1
    Last Post: Sep 19th, 2005, 09:15 AM
  2. Replies: 4
    Last Post: Jun 15th, 2005, 04:47 PM
  3. Replies: 7
    Last Post: Oct 21st, 2004, 03:39 PM
  4. Replies: 1
    Last Post: Oct 1st, 2004, 10:04 AM
  5. Replies: 2
    Last Post: Aug 28th, 2004, 07:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •