[Hibernate-JIRA] Created: (EJB-225) EntityManager.find infinite loop related to ANN-381
by John Schneider (JIRA)
EntityManager.find infinite loop related to ANN-381
---------------------------------------------------
Key: EJB-225
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-225
Project: Hibernate Entity Manager
Type: Bug
Environment: Hibernate Annotations 3.2.0.cr2
Hibernate EntityManager 3.2.0.cr2
Hibernate Core 3.2.0.cr4
Reporter: John Schneider
Attachments: Test.zip
I've tested the fix for ANN-381 and found that the improvement is not working correctly with the Entity Manager, specifically the find method. When calling the find method on a OneToMany collection mapped by a field in a primary key class, the Entity manager goes into an infinite loop of selecting records.
Please note that a workaround is to replace the entity managers find method with a query, such as this:
Query query = entityManager.createQuery("select c from Card c where c.id = :id");
query.setParameter("id", id);
return (Card) query.getSingleResult();
However, this workaround doesn't work if you have other entities that relate to something like the Card entity, shown below. I'll expand on the example code from ANN-381 to show the problem of infinite looping when trying to load the related collection.
@Entity
public class Card implements Serializable {
@Id
private String id;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "primaryKey.card")
private Set<CardField> fields;
public Card(String id) {
this();
this.id = id;
}
Card() {
fields = new HashSet<CardField>();
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public void addField(Card card, Key key) {
fields.add(new CardField(card, key));
}
}
@Entity
public class CardField implements Serializable {
@EmbeddedId
private PrimaryKey primaryKey;
CardField(Card card, Key key) {
this.primaryKey = new PrimaryKey(card, key);
}
CardField() {
}
}
@Embeddable
public class PrimaryKey implements Serializable {
@ManyToOne(optional = false)
private Card card;
@ManyToOne(optional = false)
private Key key;
public PrimaryKey(Card card, Key key) {
this.card = card;
this.key = key;
}
PrimaryKey() {}
}
@Entity
public class Key implements Serializable {
@Id
private String id;
public Key(String id) {
this.id = id;
}
Key() {
}
}
>From what I can tell, this maps fine with the correct Hibernate libs and JBoss EJB Embeddable Alpha 9. However, the Entity Manager must be creating bad query code or something with similar results to having bad queries. I've testing with the following DAO:
@Stateless
public class CardDAOBean implements CardDAOLocal {
@PersistenceContext
private EntityManager entityManager;
public void createCard(Card card) {
entityManager.persist(card);
}
public Card findCard(String id) {
return entityManager.find(Card.class, id);
}
public void createKey(Key key) {
entityManager.persist(key);
}
}
The Test class:
public class EJBTest {
private Card card;
private Key key;
public static void main(String[] args) {
TestRunner.run(suite());
}
public static junit.framework.Test suite() {
TestSuite suite = new TestSuite("Test for ANN-381");
suite.addTest(new JUnit4TestAdapter(EJBTest.class));
// setup test so that embedded JBoss is started/stopped once for all
// tests here.
TestSetup wrapper = new TestSetup(suite) {
protected void setUp() {
startupEmbeddedJboss();
}
protected void tearDown() {
shutdownEmbeddedJboss();
}
};
return wrapper;
}
@Before
public void setup() {
card = new Card("cardId");
key = new Key("keyId");
card.addField(card, key);
}
@Test
public void persist() throws Exception {
InitialContext ctx = getInitialContext();
CardDAOLocal CardDAOLocal = (CardDAOLocal) ctx.lookup("CardDAOBean/local");
CardDAOLocal.createKey(key);
CardDAOLocal.createCard(card);
Card card = CardDAOLocal.findCard(this.card.getId());
assertNotNull(card);
}
private static void startupEmbeddedJboss() {
EJB3StandaloneBootstrap.boot(null);
EJB3StandaloneBootstrap.scanClasspath();
}
private static void shutdownEmbeddedJboss() {
EJB3StandaloneBootstrap.shutdown();
}
public static InitialContext getInitialContext() throws Exception {
Hashtable properties = getInitialContextProperties();
return new InitialContext(properties);
}
private static Hashtable getInitialContextProperties() {
Hashtable<String, String> props = new Hashtable<String, String>();
props.put("java.naming.factory.initial",
"org.jnp.interfaces.LocalOnlyContextFactory");
props.put("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");
return props;
}
}
Here's some relevant debugging output:
Row insert: update CardField set card_id=? where card_id=? and key_id=?
Row delete: update CardField set card_id=null where card_id=? and card_id=? and key_id=?
One-shot delete: update CardField set card_id=null where card_id=?
Static select for entity entity.CardField: select cardfield0_.card_id as card2_1_0_, cardfield0_.key_id as key1_1_0_ from CardField cardfield0_ where cardfield0_.card_id=? and cardfield0_.key_id=?
Static select for action ACTION_MERGE on entity entity.CardField: select cardfield0_.card_id as card2_1_0_, cardfield0_.key_id as key1_1_0_ from CardField cardfield0_ where cardfield0_.card_id=? and cardfield0_.key_id=?
Static select for action ACTION_REFRESH on entity entity.CardField: select cardfield0_.card_id as card2_1_0_, cardfield0_.key_id as key1_1_0_ from CardField cardfield0_ where cardfield0_.card_id=? and cardfield0_.key_id=?
Static select for entity entity.Card: select card0_.id as id0_1_, fields1_.card_id as card2_3_, fields1_.key_id as key1_3_, fields1_.card_id as card2_1_0_, fields1_.key_id as key1_1_0_ from Card card0_ left outer join CardField fields1_ on card0_.id=fields1_.card_id where card0_.id=?
Static select for entity entity.Card: select card0_.id as id0_1_, fields1_.card_id as card2_3_, fields1_.key_id as key1_3_, fields1_.card_id as card2_1_0_, fields1_.key_id as key1_1_0_ from Card card0_ left outer join CardField fields1_ on card0_.id=fields1_.card_id where card0_.id=?
Static select for entity entity.Card: select card0_.id as id0_0_ from Card card0_ where card0_.id=?
Static select for entity entity.Card: select card0_.id as id0_0_ from Card card0_ where card0_.id=?
Static select for entity entity.Card: select card0_.id as id0_0_ from Card card0_ where card0_.id=?
Static select for action ACTION_MERGE on entity entity.Card: select card0_.id as id0_1_, fields1_.card_id as card2_3_, fields1_.key_id as key1_3_, fields1_.card_id as card2_1_0_, fields1_.key_id as key1_1_0_ from Card card0_ left outer join CardField fields1_ on card0_.id=fields1_.card_id where card0_.id=?
Static select for action ACTION_REFRESH on entity entity.Card: select card0_.id as id0_1_, fields1_.card_id as card2_3_, fields1_.key_id as key1_3_, fields1_.card_id as card2_1_0_, fields1_.key_id as key1_1_0_ from Card card0_ left outer join CardField fields1_ on card0_.id=fields1_.card_id where card0_.id=?
Static select for entity entity.Key: select key0_.id as id2_0_ from Key key0_ where key0_.id=?
Static select for entity entity.Key: select key0_.id as id2_0_ from Key key0_ where key0_.id=?
Static select for entity entity.Key: select key0_.id as id2_0_ from Key key0_ where key0_.id=?
Static select for entity entity.Key: select key0_.id as id2_0_ from Key key0_ where key0_.id=?
Static select for entity entity.Key: select key0_.id as id2_0_ from Key key0_ where key0_.id=?
Static select for action ACTION_MERGE on entity entity.Key: select key0_.id as id2_0_ from Key key0_ where key0_.id=?
Static select for action ACTION_REFRESH on entity entity.Key: select key0_.id as id2_0_ from Key key0_ where key0_.id=?
Static select for one-to-many entity.Card.fields: select fields0_.card_id as card2_1_, fields0_.key_id as key1_1_, fields0_.card_id as card2_1_0_, fields0_.key_id as key1_1_0_ from CardField fields0_ where fields0_.card_id=?
When I call the findCard method in my EJB, the entity manager keeps looping through the select process several hundred times, and then dies from a stack overflow.
Here's a sample of looping:
DEBUG 17-09 21:17:18,328 (Log4JLogger.java:debug:84) -select card0_.id as id0_1_, fields1_.card_id as card2_3_, fields1_.key_id as key1_3_, fields1_.card_id as card2_1_0_, fields1_.key_id as key1_1_0_ from Card card0_ left outer join CardField fields1_ on card0_.id=fields1_.card_id where card0_.id=?
DEBUG 17-09 21:17:18,343 (Log4JLogger.java:debug:84) -about to open ResultSet (open ResultSets: 0, globally: 0)
DEBUG 17-09 21:17:18,343 (Log4JLogger.java:debug:84) -loading entity: [entity.Card#cardId]
DEBUG 17-09 21:17:18,359 (Log4JLogger.java:debug:84) -about to open PreparedStatement (open PreparedStatements: 1, globally: 1)
DEBUG 17-09 21:17:18,359 (Log4JLogger.java:debug:84) -select card0_.id as id0_1_, fields1_.card_id as card2_3_, fields1_.key_id as key1_3_, fields1_.card_id as card2_1_0_, fields1_.key_id as key1_1_0_ from Card card0_ left outer join CardField fields1_ on card0_.id=fields1_.card_id where card0_.id=?
DEBUG 17-09 21:17:18,359 (Log4JLogger.java:debug:84) -about to open ResultSet (open ResultSets: 1, globally: 1)
DEBUG 17-09 21:17:18,359 (Log4JLogger.java:debug:84) -loading entity: [entity.Card#cardId]
DEBUG 17-09 21:17:18,359 (Log4JLogger.java:debug:84) -about to open PreparedStatement (open PreparedStatements: 2, globally: 2)
DEBUG 17-09 21:17:18,359 (Log4JLogger.java:debug:84) -select card0_.id as id0_1_, fields1_.card_id as card2_3_, fields1_.key_id as key1_3_, fields1_.card_id as card2_1_0_, fields1_.key_id as key1_1_0_ from Card card0_ left outer join CardField fields1_ on card0_.id=fields1_.card_id where card0_.id=?
DEBUG 17-09 21:17:18,359 (Log4JLogger.java:debug:84) -about to open ResultSet (open ResultSets: 2, globally: 2)
DEBUG 17-09 21:17:18,359 (Log4JLogger.java:debug:84) -loading entity: [entity.Card#cardId]
DEBUG 17-09 21:17:18,359 (Log4JLogger.java:debug:84) -about to open PreparedStatement (open PreparedStatements: 3, globally: 3)
DEBUG 17-09 21:17:18,375 (Log4JLogger.java:debug:84) -select card0_.id as id0_1_, fields1_.card_id as card2_3_, fields1_.key_id as key1_3_, fields1_.card_id as card2_1_0_, fields1_.key_id as key1_1_0_ from Card card0_ left outer join CardField fields1_ on card0_.id=fields1_.card_id where card0_.id=?
DEBUG 17-09 21:17:18,375 (Log4JLogger.java:debug:84) -about to open ResultSet (open ResultSets: 3, globally: 3)
DEBUG 17-09 21:17:18,375 (Log4JLogger.java:debug:84) -loading entity: [entity.Card#cardId]
DEBUG 17-09 21:17:18,375 (Log4JLogger.java:debug:84) -about to open PreparedStatement (open PreparedStatements: 4, globally: 4)
DEBUG 17-09 21:17:18,375 (Log4JLogger.java:debug:84) -select card0_.id as id0_1_, fields1_.card_id as card2_3_, fields1_.key_id as key1_3_, fields1_.card_id as card2_1_0_, fields1_.key_id as key1_1_0_ from Card card0_ left outer join CardField fields1_ on card0_.id=fields1_.card_id where card0_.id=?
DEBUG 17-09 21:17:18,375 (Log4JLogger.java:debug:84) -about to open ResultSet (open ResultSets: 4, globally: 4)
DEBUG 17-09 21:17:18,375 (Log4JLogger.java:debug:84) -loading entity: [entity.Card#cardId]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HHH-5032) Setting LockModeType.OPTIMISTIC_FORCE_INCREMENT defaults to only OPTIMISTIC
by Carlos Vara (JIRA)
Setting LockModeType.OPTIMISTIC_FORCE_INCREMENT defaults to only OPTIMISTIC
---------------------------------------------------------------------------
Key: HHH-5032
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5032
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.0-CR-2
Environment: Hibernate Core 3.5.0-CR-2, Hibernate Validator 4.1 Snapshot, Spring 3.0.1, JPA2
Reporter: Carlos Vara
Using EntityManager.lock(entity, LockModeType.OPTIMISTIC_FORCE_INCREMENT) doesn't change lock type, and version doesn't get updated on transaction commit.
The following code:
System.out.println("PRE lock mode: " + this.entityManager.getLockMode(an));
this.entityManager.lock(an, LockModeType.OPTIMISTIC_FORCE_INCREMENT);
System.out.println("POST lock mode: " + this.entityManager.getLockMode(an));
Outputs:
PRE lock mode: OPTIMISTIC
POST lock mode: OPTIMISTIC
Debugging AbstractLockUpgradeEventListener.upgradeLock, the reason is it doesn't upgrade it because previous lock mode is "READ" (whose level is 5), and OPTIMISTIC_FORCE_INCREMENT has level 4, so it doesn't trigger the update.
I'm not sure about Hibernate's LockMode, but I think that OPTIMISTIC_FORCE_INCREMENT is a bit more restrictive than just OPTIMISTIC, so the locking type should be upgraded.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HHH-4966) Entity Manager bug with ParameterExpressionImpl
by jean-claude cote (JIRA)
Entity Manager bug with ParameterExpressionImpl
-----------------------------------------------
Key: HHH-4966
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4966
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.5.0-CR-1
Reporter: jean-claude cote
Emmanuel
There seems to be a bug with the ParameterExpressionImpl class when rendering.
If you create a criteria query using a ParameterExpression instance in
multiple places in your query the rendering of this query will produce
multiple pram0, param1, param2 for the same ParameterExpression
instance.
We fixed this bug by augmenting the RenderingContext interface with
generateParameterName(Expression<?> exp). With this information the
rendering context can give back the same jpaqlParameterName for the
same ParameterExpression instance. All it has to do is do a lookup in
its explicitParamtermapping map.
Thanks
Jean-Claude
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HHH-5006) hibernate.globally_quoted_identifiers=true and Annotations tests
by Stephan Palm (JIRA)
hibernate.globally_quoted_identifiers=true and Annotations tests
----------------------------------------------------------------
Key: HHH-5006
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5006
Project: Hibernate Core
Issue Type: Bug
Components: annotations, core
Affects Versions: 3.5.0-CR-2
Environment: eclipse galileo
jdk 1.6
Server library JBoss 6.0 M2
(actually I don`t think you need any of this information)
Reporter: Stephan Palm
If I use hibernate.globally_quoted_identifiers=true in order to quote all identifiers, then the mapping for column names breakes if I have a column with a @Column annotation but without a @Column(name=<COLUMN_NAME>). The mapping for the column name then turns out to be ``. Which leads to problems when creating new tables.
I was able to track the error back to
{code}
final String columnName = nameNormalizer.normalizeIdentifierQuoting( col.name() );
{code}
from Ejb3Column.java.
col.name() returns an empty string because the name was not explicitly set.
nameNormalizer.normalizeIdentifierQuoting( col.name() ) then makes `` from the empty string.
I was able to fix this problem by adding a guard to the nameNormalizer.normalizeIdentifierQuoting function:
{code}
if ( identifier.length() == 0)
return null;
{code}
The function now looks like this:
{code}
public String normalizeIdentifierQuoting(String identifier) {
if ( identifier == null ) {
return null;
}
if ( identifier.length() == 0)
return null;
// Convert the JPA2 specific quoting character (double quote) to Hibernate's (back tick)
if ( identifier.startsWith( "\"" ) && identifier.endsWith( "\"" ) ) {
return '`' + identifier.substring( 1, identifier.length() - 1 ) + '`';
}
// If the user has requested "global" use of quoted identifiers, quote this identifier (using back ticks)
// if not already
if ( isUseQuotedIdentifiersGlobally() && ! ( identifier.startsWith( "`" ) && identifier.endsWith( "`" ) ) ) {
return '`' + identifier + '`';
}
return identifier;
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HHH-5042) TableGenerator does not increment hibernate_sequences.next_hi_value anymore after having exhausted the current lo-range
by Guenther Demetz (JIRA)
TableGenerator does not increment hibernate_sequences.next_hi_value anymore after having exhausted the current lo-range
-----------------------------------------------------------------------------------------------------------------------
Key: HHH-5042
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5042
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-CR-2, 3.5.0-CR-1, 3.5.0-Beta-4, 3.5.0-Beta-3, 3.5.0-Beta-2, 3.5.0.Beta-1
Environment: Hibernate: 3.5 , db: HSQLDB (not relevant)
Reporter: Guenther Demetz
Priority: Critical
Attachments: TestTableGenerator.java
This bug is new in 3.5
In version 3.5 class MultipleHiLoPerTableGenerator.java was modified introducing a
new increment variable
IntegralDataTypeHolder value;
along with
int lo;
The problem in the new code is that only value get's incremented whilst variable lo
is still used to check when a new hiVal must be obtained.
if ( lo > maxLo ) {
IntegralDataTypeHolder hiVal = (IntegralDataTypeHolder) doWorkInNewTransaction( session );
as lo is never incremented, MultipleHiLoPerTableGenerator continues to deliver numbers without ever update
hibernate_sequences.next_hi_value on the database (only one unique update is propagates at the first insert)
This lead to duplicate keys as soon another session from another sessionfactory tries to insert new objects on the concerning table.
Please see attached testcase.
IMPORTANT ADVICE TO RUN THE TESTCASE:
as the testcase uses 2 sessionfactories hibernate.hbm2ddl.auto=create cannot be used!!
Schema has to be exported separately and the testcase must run without hbm2ddl.auto property!
Here the schema for HSQLDB:
create table A (oid bigint not null, name varchar(255), version integer not null, primary key (oid), unique (name))
create table hibernate_sequences ( sequence_name varchar(255), sequence_next_hi_value integer )
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (HHH-4991) ManyToMany table not joined due to max_join_depth parameter, results to SQL exceptions
by Sergii Novotarskyi (JIRA)
ManyToMany table not joined due to max_join_depth parameter, results to SQL exceptions
--------------------------------------------------------------------------------------
Key: HHH-4991
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4991
Project: Hibernate Core
Issue Type: Bug
Components: query-criteria
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5.0-CR-2, MacOS X, MySQL 5.1
Reporter: Sergii Novotarskyi
Attachments: Example.zip
*max_join_depth* parameter prevents Hibernate from joining one end of ManyToMany relationship when using Criteria API, if the relationship is "far" enough from the root entity.
{quote}
Criteria c = session.createCriteria(SubEntity.class)
.createAlias("entity", "e") // ManyToOne, inner join
.createAlias("e.entity", "ee") // ManyToOne, inner join
.createAlias("ee.sides", "s") // ManyToMany, inner join + left outer join
.setProjection(Projections.count("id"))
.add(Restrictions.ne("s.data", "abc"));
{quote}
When *max_join_depth* is set to *2* (default) the above example generates following SQL query
{quote}
select count(this_.sub_id) as y0_ from SubEntity this_
inner join SubMainEntity e1_ on this_.submain_id=e1_.submain_id
inner join MainEntity ee2_ on e1_.main_id=ee2_.main_id
inner join MainSide sides7_ on ee2_.main_id=sides7_.main_id
where s3_.data<>?
{quote}
The query, naturally, throws the "Unknown column 's3_.data' in 'where clause'" exception.
Expected query would be
{quote}
select count(this_.sub_id) as y0_ from SubEntity this_
inner join SubMainEntity e1_ on this_.submain_id=e1_.submain_id
inner join MainEntity ee2_ on e1_.main_id=ee2_.main_id
inner join MainSide sides7_ on ee2_.main_id=sides7_.main_id
left outer join SideEntity s3_ on sides7_.side_id=s3_.side_id
where s3_.data<>?
{quote}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[Hibernate-JIRA] Created: (ANN-756) @Column annotation ignored when placed on entity's @Id property
by sagi mann (JIRA)
@Column annotation ignored when placed on entity's @Id property
---------------------------------------------------------------
Key: ANN-756
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-756
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.3.1.GA
Environment: hib core 3.2.6, my sql 5
Reporter: sagi mann
Hibernate docs specify that when using a compound key class, a Hibernate optional feature is to place @Column annotations within the key class. The observed behavior is that Hibernate ignores @Column if placed ANYWHERE ELSE, for example, on the entity's ID properties. In other words, the standard JPA way of annotating ID fields is not working under Hibernate, and the "optional" feature is mandatory.
Example how to reproduce (see comments inside the code regarding the inconsistency above). Accessors were omitted for clarity:
// the identity class
@Entity
public class SecurityIdentity implements Serializable {
public SecurityIdentity() {}
@Id
@Column(name="IDENTITY_ID")
@GeneratedValue
public Long getId() ...
@Column(name="IDENTITY_NAME")
public String getName() ...
@Override public boolean equals(Object o) ...
@Override public int hashCode() ...
}
// the domain class
@Entity
public class SecurityDomain implements Serializable {
public SecurityDomain() {}
@Id
@Column(name="DOMAIN_ID")
@GeneratedValue
public Long getId() ...
@Column(name="DOMAIN_NAME")
public String getName() ...
@Override public boolean equals(Object o) ...
@Override public int hashCode() ...
}
// the domain-identity mapping class
@Entity
@IdClass(pu1.DomainIdentityPK.class)
public class DomainIdentity implements Serializable {
public DomainIdentity() {}
@Id
public Long getDomainId() ...
@Id
public String getUserAlias() ...
@ManyToOne
@JoinColumn(name="IDENTITY_ID")
public SecurityIdentity getSecurityIdentity() ...
@ManyToOne
@JoinColumn(name="DOMAIN_ID", insertable=false, updatable=false)
public SecurityDomain getSecurityDomain() { return securityDomain; }
public void setSecurityDomain(SecurityDomain securityDomain) {
this.securityDomain = securityDomain;
this.domainId = (securityDomain != null ? securityDomain.getId() : null);
}
private SecurityDomain securityDomain;
}
// the map key class
public class DomainIdentityPK implements Serializable {
public DomainIdentityPK() {
}
/********* @Column inconsistency - cannot be placed inside the entity - only inside the PK class *******/
@Column(name="DOMAIN_ID")
public Long getDomainId() ...
[b]@Column(name="ALIAS")[/b]
public String getUserAlias() ...
public boolean equals(Object o) ...
public int hashCode() ...
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months