Results 1 to 1 of 1

Thread: SimpleJdbcTemplate

  1. #1
    Join Date
    Mar 2006
    Posts
    1

    Default SimpleJdbcTemplate

    Hello guys,

    what is the best way to map a row with a composite key? Has anyone a good sample? Does i have to implement two row mappers (one for the table containing this composite primary key and one row mapper for the composite key)? What is the impact of this design?

    Example:
    Class A has 4 attributes
    String aa (identifier)
    String ab (some value)
    String ac (some value)
    int ad (some value)
    Class B has 3 attributes
    String ba (identifier 1 of composite key)
    String bc (identifier 2 of composite key)
    int bd (some value)

    or does i have to design my second entity with
    Class B
    MyCompositeKey bac (composite key)
    int bd

    What is the best design and easiest way to map entities with data access using jdbc with spring and how can i realize it?
    In Class B i have a displayNumber bd which i have to query and update afterwards while a limit ad hasn't reached

    Kindly Greetings
    Ünhan
    Last edited by Uenhan Inay; Apr 20th, 2011 at 12:55 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
  •