Announcement Announcement Module
No announcement yet.
ItemKeyGenerator Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ItemKeyGenerator

    Can anybody kindly please tell me how to create ItemKeyGenerator.
    I have to manipulate with many objects (including wrappers).
    I am getting "Inconsistent state for failed item key: hashCode has changed. Consider whether equals() or hashCode() for the item might be inconsistent, or if you need to supply a better ItemKeyGenerator" for exceptions.
    I really stuck with this.

    It will be very helpful if anybody can help me on this?

  • #2
    An ItemKeyGenerator just has to produce a key for the item that is consistent and doesn't change during the processing of the item. A business key or message identifier works best. The most common mistake is to use a primary key which starts off as null (before item is inserted in database) and then is non-null by the end of the process.