Hi I am using hibernate 3.6 and trying to do the following I have an entity whose id field is either set by a sequence or is assigned by the user Its set by the sequence in one scenario in one maven project and assigned in a data migration scenario which is in another maven project
Is it possible to do this via some id generation strategy in hibernate ? <id name="matchId" type="long" unsaved-value="0" column="match_id"> <generator class="native"> <!-- ATTN: When copying data from one database to another, be sure to set this field explicitly in one of them, so that IDs will not get out of sync between the two. --> <param name="sequence">seq_matches_all</param> </generator> </id> This always uses the sequence, but we want to use the assigned in another scenario. Is it possible to do without having 2 mapping files ?
|