I'm having this message exception and using Hibernate Synchronizer.
I have two objects "Tournament" and "TournamentOptions" that contains 20 properties. This is a unidirectional many-to-one association from Tournament to TournamentMode.
Hibernate version:
Hibernate 2.1.6
Mapping documents:
TournamentOption.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="com.pescorer.business.TournamentOption"
table="TOURNAMENT_OPTIONS"
>
<id
name="tournamentOptionsId"
type="java.lang.Integer"
column="TOURNAMENT_OPTIONS_ID"
>
<generator class="native" />
</id>
<property
name="tournamentUsersNb"
type="java.lang.Integer"
column="TOURNAMENT_USERS_NB"
/>
<property
name="tournamentFederationsNb"
type="java.lang.Integer"
column="TOURNAMENT_FEDERATIONS_NB"
/>
<property
name="tournamentFederationUsersNb"
type="java.lang.Integer"
column="TOURNAMENT_FEDERATION_USERS_NB"
/>
<property
name="tournamentGroups"
type="java.lang.Object"
column="TOURNAMENT_GROUPS"
/>
<property
name="tournamentThirdPlaceGame"
type="java.lang.Object"
column="TOURNAMENT_THIRD_PLACE_GAME"
/>
<property
name="tournamentDrawReplay"
type="java.lang.Object"
column="TOURNAMENT_DRAW_REPLAY"
/>
<property
name="tournamentGroupsNb"
type="java.lang.Integer"
column="TOURNAMENT_GROUPS_NB"
/>
<property
name="tournamentGroupsQualified"
type="java.lang.Integer"
column="TOURNAMENT_GROUPS_QUALIFIED"
/>
<property
name="tournamentConfrontationsNb"
type="java.lang.Integer"
column="TOURNAMENT_CONFRONTATIONS_NB"
/>
<property
name="tournamentMultipleSeasons"
type="java.lang.Object"
column="TOURNAMENT_MULTIPLE_SEASONS"
/>
<property
name="tournamentMultipleSeasonsMoney"
type="java.lang.Integer"
column="TOURNAMENT_MULTIPLE_SEASONS_MONEY"
/>
<property
name="tournamentMultipleSeasonsDivisionsNb"
type="java.lang.Integer"
column="TOURNAMENT_MULTIPLE_SEASONS_DIVISIONS_NB"
/>
<property
name="tournamentMultipleSeasonsD1TeamsNb"
type="java.lang.Integer"
column="TOURNAMENT_MULTIPLE_SEASONS_D1_TEAMS_NB"
/>
<property
name="tournamentMultipleSeasonsPromoD2RelegD1TeamsNb"
type="java.lang.Integer"
column="TOURNAMENT_MULTIPLE_SEASONS_PROMO_D2_RELEG_D1_TEAMS_NB"
/>
<property
name="tournamentMultipleSeasonsD2TeamsNb"
type="java.lang.Integer"
column="TOURNAMENT_MULTIPLE_SEASONS_D2_TEAMS_NB"
/>
<property
name="tournamentMultipleSeasonsPromoD3RelegD2TeamsNb"
type="java.lang.Integer"
column="TOURNAMENT_MULTIPLE_SEASONS_PROMO_D3_RELEG_D2_TEAMS_NB"
/>
<property
name="tournamentMultipleSeasonsD3TeamsNb"
type="java.lang.Integer"
column="TOURNAMENT_MULTIPLE_SEASONS_D3_TEAMS_NB"
/>
<property
name="tournamentCardsCountBetweenLeagueCup"
type="java.lang.Object"
column="TOURNAMENT_CARDS_COUNT_BETWEEN_LEAGUE_CUP"
/>
<property
name="tournamentFederationMultipleGames"
type="java.lang.Object"
column="TOURNAMENT_FEDERATION_MULTIPLE_GAMES"
/>
<!-- Associations -->
</class>
</hibernate-mapping>
Tournament.hbm.xml
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="com.pescorer.business.Tournament"
table="TOURNAMENT"
>
<id
name="tournamentId"
type="java.lang.Integer"
column="TOURNAMENT_ID"
>
<generator class="native" />
</id>
<property
name="tournamentName"
type="java.lang.String"
column="TOURNAMENT_NAME"
not-null="true"
unique="true"
length="100"
/>
<property
name="tournamentOrganizer"
type="java.lang.String"
column="TOURNAMENT_ORGANIZER"
not-null="true"
length="50"
/>
<property
name="tournamentDate"
type="java.sql.Date"
column="TOURNAMENT_DATE"
not-null="true"
/>
<property
name="tournamentPlace"
type="java.lang.String"
column="TOURNAMENT_PLACE"
length="50"
/>
<property
name="tournamentLogo"
type="java.lang.String"
column="TOURNAMENT_LOGO"
length="255"
/>
<property
name="tournamentSendInfo"
type="java.lang.Object"
column="TOURNAMENT_SEND_INFO"
not-null="true"
/>
<property
name="tournamentGameWinPoints"
type="int"
column="TOURNAMENT_GAME_WIN_POINTS"
not-null="true"
/>
<property
name="tournamentGameDrawPoints"
type="int"
column="TOURNAMENT_GAME_DRAW_POINTS"
not-null="true"
/>
<property
name="tournamentGameLossPoints"
type="int"
column="TOURNAMENT_GAME_LOSS_POINTS"
not-null="true"
/>
<property
name="tournamentGameTwoLegs"
type="java.lang.Object"
column="TOURNAMENT_GAME_TWO_LEGS"
not-null="true"
/>
<property
name="tournamentIsFinished"
type="java.lang.Object"
column="TOURNAMENT_IS_FINISHED"
not-null="true"
/>
<!-- Associations -->
<!-- uni-directional many-to-one association to TournamentMode -->
<many-to-one
name="tournamentMode"
class="com.pescorer.business.TournamentMode"
>
<column name="TOURNAMENT_MODE_ID" />
</many-to-one>
<!-- uni-directional many-to-one association to TournamentOption -->
<many-to-one
name="tournamentOption"
class="com.pescorer.business.TournamentOption"
>
<column name="TOURNAMENT_OPTIONS_ID" />
</many-to-one>
<!-- uni-directional many-to-one association to TournamentType -->
<many-to-one
name="tournamentType"
class="com.pescorer.business.TournamentType"
>
<column name="TOURNAMENT_TYPE_ID" />
</many-to-one>
<!-- bi-directional many-to-many association to Federation -->
<set
name="federations"
lazy="true"
cascade="all-delete-orphan"
table="TOURNAMENT_FEDERATIONS"
inverse="true"
>
<key>
<column name="TOURNAMENT_ID" />
</key>
<many-to-many
class="com.pescorer.business.Federation"
>
<column name="TOURNAMENT_FEDERATION_ID" />
</many-to-many>
</set>
<!-- bi-directional many-to-many association to User -->
<set
name="users"
lazy="true"
cascade="all-delete-orphan"
table="TOURNAMENT_USERS"
inverse="true"
>
<key>
<column name="TOURNAMENT_ID" />
</key>
<many-to-many
class="com.pescorer.business.User"
>
<column name="TOURNAMENT_USER_ID" />
</many-to-many>
</set>
</class>
</hibernate-mapping>
BaseTournamentOption.java
package com.pescorer.business.base;
import java.io.Serializable;
/**
* This class has been automatically generated by Hibernate Synchronizer.
* For more information or documentation, visit The Hibernate Synchronizer page
* at
http://www.binamics.com/hibernatesync or contact Joe Hudson at
joe@binamics.com.
*
* This is an object that contains data related to the TOURNAMENT_OPTIONS table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="TOURNAMENT_OPTIONS"
*/
public abstract class BaseTournamentOption implements Serializable {
public static String PROP_TOURNAMENT_FEDERATIONS_NB = "tournamentFederationsNb";
public static String PROP_TOURNAMENT_GROUPS_NB = "tournamentGroupsNb";
public static String PROP_TOURNAMENT_MULTIPLE_SEASONS_PROMO_D3_RELEG_D2_TEAMS_NB = "tournamentMultipleSeasonsPromoD3RelegD2TeamsNb";
public static String PROP_TOURNAMENT_FEDERATION_MULTIPLE_GAMES = "tournamentFederationMultipleGames";
public static String PROP_TOURNAMENT_MULTIPLE_SEASONS_DIVISIONS_NB = "tournamentMultipleSeasonsDivisionsNb";
public static String PROP_TOURNAMENT_MULTIPLE_SEASONS_MONEY = "tournamentMultipleSeasonsMoney";
public static String PROP_TOURNAMENT_CARDS_COUNT_BETWEEN_LEAGUE_CUP = "tournamentCardsCountBetweenLeagueCup";
public static String PROP_TOURNAMENT_MULTIPLE_SEASONS = "tournamentMultipleSeasons";
public static String PROP_TOURNAMENT_MULTIPLE_SEASONS_D1_TEAMS_NB = "tournamentMultipleSeasonsD1TeamsNb";
public static String PROP_TOURNAMENT_MULTIPLE_SEASONS_D3_TEAMS_NB = "tournamentMultipleSeasonsD3TeamsNb";
public static String PROP_TOURNAMENT_THIRD_PLACE_GAME = "tournamentThirdPlaceGame";
public static String PROP_TOURNAMENT_OPTIONS_ID = "tournamentOptionsId";
public static String PROP_TOURNAMENT_GROUPS_QUALIFIED = "tournamentGroupsQualified";
public static String PROP_TOURNAMENT_USERS_NB = "tournamentUsersNb";
public static String PROP_TOURNAMENT_CONFRONTATIONS_NB = "tournamentConfrontationsNb";
public static String PROP_TOURNAMENT_DRAW_REPLAY = "tournamentDrawReplay";
public static String PROP_TOURNAMENT_MULTIPLE_SEASONS_D2_TEAMS_NB = "tournamentMultipleSeasonsD2TeamsNb";
public static String PROP_TOURNAMENT_MULTIPLE_SEASONS_PROMO_D2_RELEG_D1_TEAMS_NB = "tournamentMultipleSeasonsPromoD2RelegD1TeamsNb";
public static String PROP_TOURNAMENT_GROUPS = "tournamentGroups";
public static String PROP_TOURNAMENT_FEDERATION_USERS_NB = "tournamentFederationUsersNb";
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer _tournamentOptionsId;
// fields
private java.lang.Integer _tournamentUsersNb;
private java.lang.Integer _tournamentFederationsNb;
private java.lang.Integer _tournamentFederationUsersNb;
private java.lang.Object _tournamentGroups;
private java.lang.Object _tournamentThirdPlaceGame;
private java.lang.Object _tournamentDrawReplay;
private java.lang.Integer _tournamentGroupsNb;
private java.lang.Integer _tournamentGroupsQualified;
private java.lang.Integer _tournamentConfrontationsNb;
private java.lang.Object _tournamentMultipleSeasons;
private java.lang.Integer _tournamentMultipleSeasonsMoney;
private java.lang.Integer _tournamentMultipleSeasonsDivisionsNb;
private java.lang.Integer _tournamentMultipleSeasonsD1TeamsNb;
private java.lang.Integer _tournamentMultipleSeasonsPromoD2RelegD1TeamsNb;
private java.lang.Integer _tournamentMultipleSeasonsD2TeamsNb;
private java.lang.Integer _tournamentMultipleSeasonsPromoD3RelegD2TeamsNb;
private java.lang.Integer _tournamentMultipleSeasonsD3TeamsNb;
private java.lang.Object _tournamentCardsCountBetweenLeagueCup;
private java.lang.Object _tournamentFederationMultipleGames;
// constructors
public BaseTournamentOption () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseTournamentOption (java.lang.Integer _tournamentOptionsId) {
this.setTournamentOptionsId(_tournamentOptionsId);
initialize();
}
protected void initialize () {}
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="native"
* column="TOURNAMENT_OPTIONS_ID"
*/
public java.lang.Integer getTournamentOptionsId () {
return _tournamentOptionsId;
}
/**
* Set the unique identifier of this class
* @param _tournamentOptionsId the new ID
*/
public void setTournamentOptionsId (java.lang.Integer _tournamentOptionsId) {
this._tournamentOptionsId = _tournamentOptionsId;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: TOURNAMENT_USERS_NB
*/
public java.lang.Integer getTournamentUsersNb () {
return _tournamentUsersNb;
}
/**
* Set the value related to the column: TOURNAMENT_USERS_NB
* @param _tournamentUsersNb the TOURNAMENT_USERS_NB value
*/
public void setTournamentUsersNb (java.lang.Integer _tournamentUsersNb) {
this._tournamentUsersNb = _tournamentUsersNb;
}
/**
* Return the value associated with the column: TOURNAMENT_FEDERATIONS_NB
*/
public java.lang.Integer getTournamentFederationsNb () {
return _tournamentFederationsNb;
}
/**
* Set the value related to the column: TOURNAMENT_FEDERATIONS_NB
* @param _tournamentFederationsNb the TOURNAMENT_FEDERATIONS_NB value
*/
public void setTournamentFederationsNb (java.lang.Integer _tournamentFederationsNb) {
this._tournamentFederationsNb = _tournamentFederationsNb;
}
/**
* Return the value associated with the column: TOURNAMENT_FEDERATION_USERS_NB
*/
public java.lang.Integer getTournamentFederationUsersNb () {
return _tournamentFederationUsersNb;
}
/**
* Set the value related to the column: TOURNAMENT_FEDERATION_USERS_NB
* @param _tournamentFederationUsersNb the TOURNAMENT_FEDERATION_USERS_NB value
*/
public void setTournamentFederationUsersNb (java.lang.Integer _tournamentFederationUsersNb) {
this._tournamentFederationUsersNb = _tournamentFederationUsersNb;
}
/**
* Return the value associated with the column: TOURNAMENT_GROUPS
*/
public java.lang.Object getTournamentGroups () {
return _tournamentGroups;
}
/**
* Set the value related to the column: TOURNAMENT_GROUPS
* @param _tournamentGroups the TOURNAMENT_GROUPS value
*/
public void setTournamentGroups (java.lang.Object _tournamentGroups) {
this._tournamentGroups = _tournamentGroups;
}
/**
* Return the value associated with the column: TOURNAMENT_THIRD_PLACE_GAME
*/
public java.lang.Object getTournamentThirdPlaceGame () {
return _tournamentThirdPlaceGame;
}
/**
* Set the value related to the column: TOURNAMENT_THIRD_PLACE_GAME
* @param _tournamentThirdPlaceGame the TOURNAMENT_THIRD_PLACE_GAME value
*/
public void setTournamentThirdPlaceGame (java.lang.Object _tournamentThirdPlaceGame) {
this._tournamentThirdPlaceGame = _tournamentThirdPlaceGame;
}
/**
* Return the value associated with the column: TOURNAMENT_DRAW_REPLAY
*/
public java.lang.Object getTournamentDrawReplay () {
return _tournamentDrawReplay;
}
/**
* Set the value related to the column: TOURNAMENT_DRAW_REPLAY
* @param _tournamentDrawReplay the TOURNAMENT_DRAW_REPLAY value
*/
public void setTournamentDrawReplay (java.lang.Object _tournamentDrawReplay) {
this._tournamentDrawReplay = _tournamentDrawReplay;
}
/**
* Return the value associated with the column: TOURNAMENT_GROUPS_NB
*/
public java.lang.Integer getTournamentGroupsNb () {
return _tournamentGroupsNb;
}
/**
* Set the value related to the column: TOURNAMENT_GROUPS_NB
* @param _tournamentGroupsNb the TOURNAMENT_GROUPS_NB value
*/
public void setTournamentGroupsNb (java.lang.Integer _tournamentGroupsNb) {
this._tournamentGroupsNb = _tournamentGroupsNb;
}
/**
* Return the value associated with the column: TOURNAMENT_GROUPS_QUALIFIED
*/
public java.lang.Integer getTournamentGroupsQualified () {
return _tournamentGroupsQualified;
}
/**
* Set the value related to the column: TOURNAMENT_GROUPS_QUALIFIED
* @param _tournamentGroupsQualified the TOURNAMENT_GROUPS_QUALIFIED value
*/
public void setTournamentGroupsQualified (java.lang.Integer _tournamentGroupsQualified) {
this._tournamentGroupsQualified = _tournamentGroupsQualified;
}
/**
* Return the value associated with the column: TOURNAMENT_CONFRONTATIONS_NB
*/
public java.lang.Integer getTournamentConfrontationsNb () {
return _tournamentConfrontationsNb;
}
/**
* Set the value related to the column: TOURNAMENT_CONFRONTATIONS_NB
* @param _tournamentConfrontationsNb the TOURNAMENT_CONFRONTATIONS_NB value
*/
public void setTournamentConfrontationsNb (java.lang.Integer _tournamentConfrontationsNb) {
this._tournamentConfrontationsNb = _tournamentConfrontationsNb;
}
/**
* Return the value associated with the column: TOURNAMENT_MULTIPLE_SEASONS
*/
public java.lang.Object getTournamentMultipleSeasons () {
return _tournamentMultipleSeasons;
}
/**
* Set the value related to the column: TOURNAMENT_MULTIPLE_SEASONS
* @param _tournamentMultipleSeasons the TOURNAMENT_MULTIPLE_SEASONS value
*/
public void setTournamentMultipleSeasons (java.lang.Object _tournamentMultipleSeasons) {
this._tournamentMultipleSeasons = _tournamentMultipleSeasons;
}
/**
* Return the value associated with the column: TOURNAMENT_MULTIPLE_SEASONS_MONEY
*/
public java.lang.Integer getTournamentMultipleSeasonsMoney () {
return _tournamentMultipleSeasonsMoney;
}
/**
* Set the value related to the column: TOURNAMENT_MULTIPLE_SEASONS_MONEY
* @param _tournamentMultipleSeasonsMoney the TOURNAMENT_MULTIPLE_SEASONS_MONEY value
*/
public void setTournamentMultipleSeasonsMoney (java.lang.Integer _tournamentMultipleSeasonsMoney) {
this._tournamentMultipleSeasonsMoney = _tournamentMultipleSeasonsMoney;
}
/**
* Return the value associated with the column: TOURNAMENT_MULTIPLE_SEASONS_DIVISIONS_NB
*/
public java.lang.Integer getTournamentMultipleSeasonsDivisionsNb () {
return _tournamentMultipleSeasonsDivisionsNb;
}
/**
* Set the value related to the column: TOURNAMENT_MULTIPLE_SEASONS_DIVISIONS_NB
* @param _tournamentMultipleSeasonsDivisionsNb the TOURNAMENT_MULTIPLE_SEASONS_DIVISIONS_NB value
*/
public void setTournamentMultipleSeasonsDivisionsNb (java.lang.Integer _tournamentMultipleSeasonsDivisionsNb) {
this._tournamentMultipleSeasonsDivisionsNb = _tournamentMultipleSeasonsDivisionsNb;
}
/**
* Return the value associated with the column: TOURNAMENT_MULTIPLE_SEASONS_D1_TEAMS_NB
*/
public java.lang.Integer getTournamentMultipleSeasonsD1TeamsNb () {
return _tournamentMultipleSeasonsD1TeamsNb;
}
/**
* Set the value related to the column: TOURNAMENT_MULTIPLE_SEASONS_D1_TEAMS_NB
* @param _tournamentMultipleSeasonsD1TeamsNb the TOURNAMENT_MULTIPLE_SEASONS_D1_TEAMS_NB value
*/
public void setTournamentMultipleSeasonsD1TeamsNb (java.lang.Integer _tournamentMultipleSeasonsD1TeamsNb) {
this._tournamentMultipleSeasonsD1TeamsNb = _tournamentMultipleSeasonsD1TeamsNb;
}
/**
* Return the value associated with the column: TOURNAMENT_MULTIPLE_SEASONS_PROMO_D2_RELEG_D1_TEAMS_NB
*/
public java.lang.Integer getTournamentMultipleSeasonsPromoD2RelegD1TeamsNb () {
return _tournamentMultipleSeasonsPromoD2RelegD1TeamsNb;
}
/**
* Set the value related to the column: TOURNAMENT_MULTIPLE_SEASONS_PROMO_D2_RELEG_D1_TEAMS_NB
* @param _tournamentMultipleSeasonsPromoD2RelegD1TeamsNb the TOURNAMENT_MULTIPLE_SEASONS_PROMO_D2_RELEG_D1_TEAMS_NB value
*/
public void setTournamentMultipleSeasonsPromoD2RelegD1TeamsNb (java.lang.Integer _tournamentMultipleSeasonsPromoD2RelegD1TeamsNb) {
this._tournamentMultipleSeasonsPromoD2RelegD1TeamsNb = _tournamentMultipleSeasonsPromoD2RelegD1TeamsNb;
}
/**
* Return the value associated with the column: TOURNAMENT_MULTIPLE_SEASONS_D2_TEAMS_NB
*/
public java.lang.Integer getTournamentMultipleSeasonsD2TeamsNb () {
return _tournamentMultipleSeasonsD2TeamsNb;
}
/**
* Set the value related to the column: TOURNAMENT_MULTIPLE_SEASONS_D2_TEAMS_NB
* @param _tournamentMultipleSeasonsD2TeamsNb the TOURNAMENT_MULTIPLE_SEASONS_D2_TEAMS_NB value
*/
public void setTournamentMultipleSeasonsD2TeamsNb (java.lang.Integer _tournamentMultipleSeasonsD2TeamsNb) {
this._tournamentMultipleSeasonsD2TeamsNb = _tournamentMultipleSeasonsD2TeamsNb;
}
/**
* Return the value associated with the column: TOURNAMENT_MULTIPLE_SEASONS_PROMO_D3_RELEG_D2_TEAMS_NB
*/
public java.lang.Integer getTournamentMultipleSeasonsPromoD3RelegD2TeamsNb () {
return _tournamentMultipleSeasonsPromoD3RelegD2TeamsNb;
}
/**
* Set the value related to the column: TOURNAMENT_MULTIPLE_SEASONS_PROMO_D3_RELEG_D2_TEAMS_NB
* @param _tournamentMultipleSeasonsPromoD3RelegD2TeamsNb the TOURNAMENT_MULTIPLE_SEASONS_PROMO_D3_RELEG_D2_TEAMS_NB value
*/
public void setTournamentMultipleSeasonsPromoD3RelegD2TeamsNb (java.lang.Integer _tournamentMultipleSeasonsPromoD3RelegD2TeamsNb) {
this._tournamentMultipleSeasonsPromoD3RelegD2TeamsNb = _tournamentMultipleSeasonsPromoD3RelegD2TeamsNb;
}
/**
* Return the value associated with the column: TOURNAMENT_MULTIPLE_SEASONS_D3_TEAMS_NB
*/
public java.lang.Integer getTournamentMultipleSeasonsD3TeamsNb () {
return _tournamentMultipleSeasonsD3TeamsNb;
}
/**
* Set the value related to the column: TOURNAMENT_MULTIPLE_SEASONS_D3_TEAMS_NB
* @param _tournamentMultipleSeasonsD3TeamsNb the TOURNAMENT_MULTIPLE_SEASONS_D3_TEAMS_NB value
*/
public void setTournamentMultipleSeasonsD3TeamsNb (java.lang.Integer _tournamentMultipleSeasonsD3TeamsNb) {
this._tournamentMultipleSeasonsD3TeamsNb = _tournamentMultipleSeasonsD3TeamsNb;
}
/**
* Return the value associated with the column: TOURNAMENT_CARDS_COUNT_BETWEEN_LEAGUE_CUP
*/
public java.lang.Object getTournamentCardsCountBetweenLeagueCup () {
return _tournamentCardsCountBetweenLeagueCup;
}
/**
* Set the value related to the column: TOURNAMENT_CARDS_COUNT_BETWEEN_LEAGUE_CUP
* @param _tournamentCardsCountBetweenLeagueCup the TOURNAMENT_CARDS_COUNT_BETWEEN_LEAGUE_CUP value
*/
public void setTournamentCardsCountBetweenLeagueCup (java.lang.Object _tournamentCardsCountBetweenLeagueCup) {
this._tournamentCardsCountBetweenLeagueCup = _tournamentCardsCountBetweenLeagueCup;
}
/**
* Return the value associated with the column: TOURNAMENT_FEDERATION_MULTIPLE_GAMES
*/
public java.lang.Object getTournamentFederationMultipleGames () {
return _tournamentFederationMultipleGames;
}
/**
* Set the value related to the column: TOURNAMENT_FEDERATION_MULTIPLE_GAMES
* @param _tournamentFederationMultipleGames the TOURNAMENT_FEDERATION_MULTIPLE_GAMES value
*/
public void setTournamentFederationMultipleGames (java.lang.Object _tournamentFederationMultipleGames) {
this._tournamentFederationMultipleGames = _tournamentFederationMultipleGames;
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.pescorer.business.base.BaseTournamentOption)) return false;
else {
com.pescorer.business.base.BaseTournamentOption mObj = (com.pescorer.business.base.BaseTournamentOption) obj;
if (null == this.getTournamentOptionsId() || null == mObj.getTournamentOptionsId()) return false;
else return (this.getTournamentOptionsId().equals(mObj.getTournamentOptionsId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getTournamentOptionsId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getTournamentOptionsId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
}
BaseTournament.java
package com.pescorer.business.base;
import java.io.Serializable;
/**
* This class has been automatically generated by Hibernate Synchronizer.
* For more information or documentation, visit The Hibernate Synchronizer page
* at
http://www.binamics.com/hibernatesync or contact Joe Hudson at
joe@binamics.com.
*
* This is an object that contains data related to the TOURNAMENT table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="TOURNAMENT"
*/
public abstract class BaseTournament implements Serializable {
public static String PROP_TOURNAMENT_ORGANIZER = "tournamentOrganizer";
public static String PROP_TOURNAMENT_LOGO = "tournamentLogo";
public static String PROP_TOURNAMENT_PLACE = "tournamentPlace";
public static String PROP_TOURNAMENT_GAME_WIN_POINTS = "tournamentGameWinPoints";
public static String PROP_TOURNAMENT_GAME_TWO_LEGS = "tournamentGameTwoLegs";
public static String PROP_TOURNAMENT_OPTION = "tournamentOption";
public static String PROP_TOURNAMENT_GAME_DRAW_POINTS = "tournamentGameDrawPoints";
public static String PROP_TOURNAMENT_TYPE = "tournamentType";
public static String PROP_TOURNAMENT_GAME_LOSS_POINTS = "tournamentGameLossPoints";
public static String PROP_TOURNAMENT_ID = "tournamentId";
public static String PROP_TOURNAMENT_MODE = "tournamentMode";
public static String PROP_TOURNAMENT_NAME = "tournamentName";
public static String PROP_TOURNAMENT_DATE = "tournamentDate";
public static String PROP_TOURNAMENT_SEND_INFO = "tournamentSendInfo";
public static String PROP_TOURNAMENT_IS_FINISHED = "tournamentIsFinished";
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer _tournamentId;
// fields
private java.lang.String _tournamentName;
private java.lang.String _tournamentOrganizer;
private java.sql.Date _tournamentDate;
private java.lang.String _tournamentPlace;
private java.lang.String _tournamentLogo;
private java.lang.Object _tournamentSendInfo;
private int _tournamentGameWinPoints;
private int _tournamentGameDrawPoints;
private int _tournamentGameLossPoints;
private java.lang.Object _tournamentGameTwoLegs;
private java.lang.Object _tournamentIsFinished;
// many to one
private com.pescorer.business.TournamentMode _tournamentMode;
private com.pescorer.business.TournamentOption _tournamentOption;
private com.pescorer.business.TournamentType _tournamentType;
// collections
private java.util.Set _federations;
private java.util.Set _users;
// constructors
public BaseTournament () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseTournament (java.lang.Integer _tournamentId) {
this.setTournamentId(_tournamentId);
initialize();
}
/**
* Constructor for required fields
*/
public BaseTournament (
java.lang.Integer _tournamentId,
java.lang.String _tournamentName,
java.lang.String _tournamentOrganizer,
java.sql.Date _tournamentDate,
java.lang.Object _tournamentSendInfo,
int _tournamentGameWinPoints,
int _tournamentGameDrawPoints,
int _tournamentGameLossPoints,
java.lang.Object _tournamentGameTwoLegs,
java.lang.Object _tournamentIsFinished) {
this.setTournamentId(_tournamentId);
this.setTournamentName(_tournamentName);
this.setTournamentOrganizer(_tournamentOrganizer);
this.setTournamentDate(_tournamentDate);
this.setTournamentSendInfo(_tournamentSendInfo);
this.setTournamentGameWinPoints(_tournamentGameWinPoints);
this.setTournamentGameDrawPoints(_tournamentGameDrawPoints);
this.setTournamentGameLossPoints(_tournamentGameLossPoints);
this.setTournamentGameTwoLegs(_tournamentGameTwoLegs);
this.setTournamentIsFinished(_tournamentIsFinished);
initialize();
}
protected void initialize () {}
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="native"
* column="TOURNAMENT_ID"
*/
public java.lang.Integer getTournamentId () {
return _tournamentId;
}
/**
* Set the unique identifier of this class
* @param _tournamentId the new ID
*/
public void setTournamentId (java.lang.Integer _tournamentId) {
this._tournamentId = _tournamentId;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: TOURNAMENT_NAME
*/
public java.lang.String getTournamentName () {
return _tournamentName;
}
/**
* Set the value related to the column: TOURNAMENT_NAME
* @param _tournamentName the TOURNAMENT_NAME value
*/
public void setTournamentName (java.lang.String _tournamentName) {
this._tournamentName = _tournamentName;
}
/**
* Return the value associated with the column: TOURNAMENT_ORGANIZER
*/
public java.lang.String getTournamentOrganizer () {
return _tournamentOrganizer;
}
/**
* Set the value related to the column: TOURNAMENT_ORGANIZER
* @param _tournamentOrganizer the TOURNAMENT_ORGANIZER value
*/
public void setTournamentOrganizer (java.lang.String _tournamentOrganizer) {
this._tournamentOrganizer = _tournamentOrganizer;
}
/**
* Return the value associated with the column: TOURNAMENT_DATE
*/
public java.sql.Date getTournamentDate () {
return _tournamentDate;
}
/**
* Set the value related to the column: TOURNAMENT_DATE
* @param _tournamentDate the TOURNAMENT_DATE value
*/
public void setTournamentDate (java.sql.Date _tournamentDate) {
this._tournamentDate = _tournamentDate;
}
/**
* Return the value associated with the column: TOURNAMENT_PLACE
*/
public java.lang.String getTournamentPlace () {
return _tournamentPlace;
}
/**
* Set the value related to the column: TOURNAMENT_PLACE
* @param _tournamentPlace the TOURNAMENT_PLACE value
*/
public void setTournamentPlace (java.lang.String _tournamentPlace) {
this._tournamentPlace = _tournamentPlace;
}
/**
* Return the value associated with the column: TOURNAMENT_LOGO
*/
public java.lang.String getTournamentLogo () {
return _tournamentLogo;
}
/**
* Set the value related to the column: TOURNAMENT_LOGO
* @param _tournamentLogo the TOURNAMENT_LOGO value
*/
public void setTournamentLogo (java.lang.String _tournamentLogo) {
this._tournamentLogo = _tournamentLogo;
}
/**
* Return the value associated with the column: TOURNAMENT_SEND_INFO
*/
public java.lang.Object getTournamentSendInfo () {
return _tournamentSendInfo;
}
/**
* Set the value related to the column: TOURNAMENT_SEND_INFO
* @param _tournamentSendInfo the TOURNAMENT_SEND_INFO value
*/
public void setTournamentSendInfo (java.lang.Object _tournamentSendInfo) {
this._tournamentSendInfo = _tournamentSendInfo;
}
/**
* Return the value associated with the column: TOURNAMENT_GAME_WIN_POINTS
*/
public int getTournamentGameWinPoints () {
return _tournamentGameWinPoints;
}
/**
* Set the value related to the column: TOURNAMENT_GAME_WIN_POINTS
* @param _tournamentGameWinPoints the TOURNAMENT_GAME_WIN_POINTS value
*/
public void setTournamentGameWinPoints (int _tournamentGameWinPoints) {
this._tournamentGameWinPoints = _tournamentGameWinPoints;
}
/**
* Return the value associated with the column: TOURNAMENT_GAME_DRAW_POINTS
*/
public int getTournamentGameDrawPoints () {
return _tournamentGameDrawPoints;
}
/**
* Set the value related to the column: TOURNAMENT_GAME_DRAW_POINTS
* @param _tournamentGameDrawPoints the TOURNAMENT_GAME_DRAW_POINTS value
*/
public void setTournamentGameDrawPoints (int _tournamentGameDrawPoints) {
this._tournamentGameDrawPoints = _tournamentGameDrawPoints;
}
/**
* Return the value associated with the column: TOURNAMENT_GAME_LOSS_POINTS
*/
public int getTournamentGameLossPoints () {
return _tournamentGameLossPoints;
}
/**
* Set the value related to the column: TOURNAMENT_GAME_LOSS_POINTS
* @param _tournamentGameLossPoints the TOURNAMENT_GAME_LOSS_POINTS value
*/
public void setTournamentGameLossPoints (int _tournamentGameLossPoints) {
this._tournamentGameLossPoints = _tournamentGameLossPoints;
}
/**
* Return the value associated with the column: TOURNAMENT_GAME_TWO_LEGS
*/
public java.lang.Object getTournamentGameTwoLegs () {
return _tournamentGameTwoLegs;
}
/**
* Set the value related to the column: TOURNAMENT_GAME_TWO_LEGS
* @param _tournamentGameTwoLegs the TOURNAMENT_GAME_TWO_LEGS value
*/
public void setTournamentGameTwoLegs (java.lang.Object _tournamentGameTwoLegs) {
this._tournamentGameTwoLegs = _tournamentGameTwoLegs;
}
/**
* Return the value associated with the column: TOURNAMENT_IS_FINISHED
*/
public java.lang.Object getTournamentIsFinished () {
return _tournamentIsFinished;
}
/**
* Set the value related to the column: TOURNAMENT_IS_FINISHED
* @param _tournamentIsFinished the TOURNAMENT_IS_FINISHED value
*/
public void setTournamentIsFinished (java.lang.Object _tournamentIsFinished) {
this._tournamentIsFinished = _tournamentIsFinished;
}
/**
* @hibernate.property
* column=TOURNAMENT_MODE_ID
*/
public com.pescorer.business.TournamentMode getTournamentMode () {
return this._tournamentMode;
}
/**
* Set the value related to the column: TOURNAMENT_MODE_ID
* @param _tournamentMode the TOURNAMENT_MODE_ID value
*/
public void setTournamentMode (com.pescorer.business.TournamentMode _tournamentMode) {
this._tournamentMode = _tournamentMode;
}
/**
* @hibernate.property
* column=TOURNAMENT_OPTIONS_ID
*/
public com.pescorer.business.TournamentOption getTournamentOption () {
return this._tournamentOption;
}
/**
* Set the value related to the column: TOURNAMENT_OPTIONS_ID
* @param _tournamentOption the TOURNAMENT_OPTIONS_ID value
*/
public void setTournamentOption (com.pescorer.business.TournamentOption _tournamentOption) {
this._tournamentOption = _tournamentOption;
}
/**
* @hibernate.property
* column=TOURNAMENT_TYPE_ID
*/
public com.pescorer.business.TournamentType getTournamentType () {
return this._tournamentType;
}
/**
* Set the value related to the column: TOURNAMENT_TYPE_ID
* @param _tournamentType the TOURNAMENT_TYPE_ID value
*/
public void setTournamentType (com.pescorer.business.TournamentType _tournamentType) {
this._tournamentType = _tournamentType;
}
/**
* Return the value associated with the column: federations
*/
public java.util.Set getFederations () {
return this._federations;
}
/**
* Set the value related to the column: federations
* @param _federations the federations value
*/
public void setFederations (java.util.Set _federations) {
this._federations = _federations;
}
public void addToFederations (Object obj) {
if (null == this._federations) this._federations = new java.util.HashSet();
this._federations.add(obj);
}
/**
* Return the value associated with the column: users
*/
public java.util.Set getUsers () {
return this._users;
}
/**
* Set the value related to the column: users
* @param _users the users value
*/
public void setUsers (java.util.Set _users) {
this._users = _users;
}
public void addToUsers (Object obj) {
if (null == this._users) this._users = new java.util.HashSet();
this._users.add(obj);
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.pescorer.business.base.BaseTournament)) return false;
else {
com.pescorer.business.base.BaseTournament mObj = (com.pescorer.business.base.BaseTournament) obj;
if (null == this.getTournamentId() || null == mObj.getTournamentId()) return false;
else return (this.getTournamentId().equals(mObj.getTournamentId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getTournamentId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getTournamentId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
}
Full stack trace of any exception that occurs:
net.sf.hibernate.MappingException: property mapping has wrong number of columns: com.pescorer.business.TournamentOption.tournamentGroups type: object
at net.sf.hibernate.mapping.PersistentClass.validate(PersistentClass.java:269)
at net.sf.hibernate.mapping.RootClass.validate(RootClass.java:169)
at net.sf.hibernate.cfg.Configuration.validate(Configuration.java:619)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:785)
at com.pescorer.business.base._BaseRootDAO.initialize(_BaseRootDAO.java:54)
at com.pescorer.business.base._BaseRootDAO.initialize(_BaseRootDAO.java:38)
at com.pescorer.Main.main(Main.java:54)
Name and version of the database you are using:
HSQLDB 1.7.2