How to use Version Property in Hibernate or Nhibernate

From: orientphoebus (orientphoebus_at_yahoo.com)
Date: 11/25/04

  • Next message: ngala: "designing rdbms"
    Date: 25 Nov 2004 08:55:26 -0800
    
    

    I have a table with columns like this:
    ----------------------------------------------
    Id number not null,
    Name VARCHAR2(100) not null,
    Update_DT DateTime not null
    ----------------------------------------------
    The Update_DT is used, so that the table can keep all the history
    versions of the data.

    I want to use Hibernate to get data from this table by a simple
    Session.Load(), but I'd like to get the latest version always.

    In the hbm.xml, I notice there are <version> and <vimestamp>
    properties, which have the similar meaning.

    How can I use Session.Load() to load the latest record into Object?

    Any similar simple solution will help.

    Thanks


  • Next message: ngala: "designing rdbms"

    Relevant Pages