Ok. This makes sense. That was what I was getting from that page as well.
How about this though... Part of the string that I am creating as the ID
is part of the request I am making in the browser.
06-Q1-105-55-01
YEAR - QUARTER - PASSED_VALUE - DAY_OF_YEAR - REQUEST_#_OF_DAY
How do I pass a value as one of the parameters?
<id name="id" type="string" column="po_number">
<generator class="com.alloy.finance.PONumberGenerator">
<param name="budgetCode">????????</param>
</generator>
</id>
Is that possible? If so, I would love to know how. :)
Charlie
hamed shayan said the following on 2/28/2006 12:24 PM:
Dear Charlie,
Look here:
5.1.4.1 <http://5.1.4.1>. Generator
The optional <generator> child element names a Java class used to
generate unique identifiers for instances of the persistent class. If
any parameters are required to configure or initialize the generator
instance, they are passed using the <param> element.
<id name="id" type="long" column="cat_id">
<generator class="org.hibernate.id.TableHiLoGenerator">
<param name="table">uid_table</param>
<param name="column">next_hi_value_column</param>
</generator>
</id>
All generators implement the interface
org.hibernate.id.IdentifierGenerator. This is a very simple interface;
some applications may choose to provide their own specialized
implementations. However, Hibernate provides a range of built-in
implementations.
You can find the above passage in here :
http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html
Sincerely Yours,
Hamed Shayan
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel