Consider the following situation:
Quote:
Account -|------0<- Transaction
An account has 0 or more transactions associated with it.
In my Hibernate mapping, an Account's Transactions are modelled as a set, with account_id as the join column between the two. So when I call:
Code:
anAccount.getTransactions()
I get a (lazy) Collection of _all_ the Transaction associated with that account.
Transactions have transaction dates.
Is there a way I can (cleanly) model in Hibernate that the join should be done on a known column ("trade_dt") whose value will vary from call to call.
Ultimately, can I acheive something like this?
Code:
anAccount.getTransactions(tradeDate)
I use hbm2java to generate Java classes from my Hibernate mappings.
Any help appreciated.