You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(22) |
Nov
(308) |
Dec
(131) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(369) |
Feb
(171) |
Mar
(236) |
Apr
(187) |
May
(218) |
Jun
(217) |
Jul
(127) |
Aug
(448) |
Sep
(270) |
Oct
(231) |
Nov
(422) |
Dec
(255) |
2004 |
Jan
(111) |
Feb
(73) |
Mar
(338) |
Apr
(351) |
May
(349) |
Jun
(495) |
Jul
(394) |
Aug
(1048) |
Sep
(499) |
Oct
(142) |
Nov
(269) |
Dec
(638) |
2005 |
Jan
(825) |
Feb
(1272) |
Mar
(593) |
Apr
(690) |
May
(950) |
Jun
(958) |
Jul
(767) |
Aug
(839) |
Sep
(525) |
Oct
(449) |
Nov
(585) |
Dec
(455) |
2006 |
Jan
(603) |
Feb
(656) |
Mar
(195) |
Apr
(114) |
May
(136) |
Jun
(100) |
Jul
(128) |
Aug
(68) |
Sep
(7) |
Oct
(1) |
Nov
(1) |
Dec
(8) |
2007 |
Jan
(4) |
Feb
(3) |
Mar
(8) |
Apr
(16) |
May
(5) |
Jun
(4) |
Jul
(6) |
Aug
(23) |
Sep
(15) |
Oct
(5) |
Nov
(7) |
Dec
(5) |
2008 |
Jan
(5) |
Feb
(1) |
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <max...@us...> - 2006-02-13 15:55:35
|
Update of /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/xpl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9420/src/org/hibernate/eclipse/console/utils/xpl Added Files: DialogSelectionHelper.java Log Message: fix license issues --- NEW FILE: DialogSelectionHelper.java --- /******************************************************************************* * Copyright (c) 2000, 2005, 2006 IBM Corporation, JBoss Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * Max Rydahl Andersen, JBoss Inc - More flexible file & directory choosing. *******************************************************************************/ package org.hibernate.eclipse.console.utils.xpl; import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator; import org.eclipse.jface.window.Window; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.ui.model.WorkbenchContentProvider; import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.ui.views.navigator.ResourceSorter; import org.hibernate.eclipse.console.FileFilter; public class DialogSelectionHelper { /** * * Shows the UI to select new JAR or ZIP archive entries located in the workspace. * The dialog returns the selected entries or <code>null</code> if the dialog has * been cancelled. The dialog does not apply any changes. * @param shell The parent shell for the dialog. * @param initialSelection The path of the element (container or archive) to initially select or <code>null</code> to not select an entry. * @param usedEntries An array of paths that are already on the classpath and therefore should not be * selected again. * @param fileExtensions An array of file extensions. * @param allowMultiple allow multiple selections. * @param allowFiles TODO * @param acceptedTypes TODO * * @return Returns the new classpath container entry paths or <code>null</code> if the dialog has * been cancelled by the user. * * Inspired by BuildPathDialogAccess.chooseJAREntries from jdt.ui.wizards */ public static IPath[] chooseFileEntries(Shell shell, IPath initialSelection, IPath[] usedEntries, String title, String description, String[] fileExtensions, boolean allowMultiple, boolean allowDirectories, boolean allowFiles ) { if (usedEntries == null) { throw new IllegalArgumentException("used entries must be not-null"); } List clazzes = new ArrayList(); if(allowDirectories) { clazzes.add(IFolder.class); clazzes.add(IProject.class); } if(allowFiles) { clazzes.add(IFile.class); } Class[] acceptedClasses = (Class[]) clazzes.toArray(new Class[clazzes.size()]); TypedElementSelectionValidator validator= new TypedElementSelectionValidator(acceptedClasses, true); ArrayList usedFiles= new ArrayList(usedEntries.length); IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot(); for (int i= 0; i < usedEntries.length; i++) { IResource resource= root.findMember(usedEntries[i]); if (resource instanceof IFile) { usedFiles.add(resource); } } IResource focus= initialSelection != null ? root.findMember(initialSelection) : null; ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(shell, new WorkbenchLabelProvider(), new WorkbenchContentProvider() ); dialog.setValidator(validator); dialog.setAllowMultiple(allowMultiple); dialog.setTitle(title); dialog.setMessage(description); dialog.addFilter(new FileFilter(fileExtensions, usedFiles, true, allowDirectories) ); dialog.setInput(root); dialog.setSorter(new ResourceSorter(ResourceSorter.NAME) ); dialog.setInitialSelection(focus); if (dialog.open() == Window.OK) { Object[] elements= dialog.getResult(); IPath[] res= new IPath[elements.length]; for (int i= 0; i < res.length; i++) { IResource elem= (IResource)elements[i]; res[i]= elem.getFullPath(); } return res; } return null; } } |
From: <max...@us...> - 2006-02-13 15:55:31
|
Update of /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9400/src/org/hibernate/eclipse/console/workbench/xpl Log Message: Directory /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl added to the repository |
From: <max...@us...> - 2006-02-13 15:55:31
|
Update of /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/xpl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9400/src/org/hibernate/eclipse/console/utils/xpl Log Message: Directory /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/xpl added to the repository |
From: <max...@us...> - 2006-02-13 15:55:16
|
Update of /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/xpl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9238/src/org/hibernate/eclipse/logging/xpl Added Files: EclipseLogger.java Log Message: fix license issues --- NEW FILE: EclipseLogger.java --- /******************************************************************************* * Copyright (c) 2004, 2006 IBM Corporation, JBoss Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation * Max Rydahl Andersen, JBoss Inc. - made non-static for reuse instead of copy/paste. *******************************************************************************/ package org.hibernate.eclipse.logging.xpl; import java.util.StringTokenizer; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.osgi.framework.Bundle; /** * Non static implementation of the Logger in WST. * * Small convenience class to log messages to plugin's log file and also, if * desired, the console. Other plugins should create a Logger with their own id. */ public class EclipseLogger { public static final int ERROR = IStatus.ERROR; // 4 public static final int ERROR_DEBUG = 200 + ERROR; public static final int INFO = IStatus.INFO; // 1 public static final int INFO_DEBUG = 200 + INFO; public static final int OK = IStatus.OK; // 0 public static final int OK_DEBUG = 200 + OK; private static final String TRACEFILTER_LOCATION = "/debug/tracefilter"; //$NON-NLS-1$ public static final int WARNING = IStatus.WARNING; // 2 public static final int WARNING_DEBUG = 200 + WARNING; private final String PLUGIN_ID; private Bundle bundle; public EclipseLogger(String pluginid) { this.PLUGIN_ID = pluginid; bundle = Platform.getBundle(PLUGIN_ID); } public EclipseLogger(Bundle bundle) { this.bundle = bundle; this.PLUGIN_ID = bundle.getSymbolicName(); } /** * Adds message to log. * * @param level * severity level of the message (OK, INFO, WARNING, ERROR, * OK_DEBUG, INFO_DEBUG, WARNING_DEBUG, ERROR_DEBUG) * @param message * text to add to the log * @param exception * exception thrown */ protected void _log(int level, String message, Throwable exception) { if (level == OK_DEBUG || level == INFO_DEBUG || level == WARNING_DEBUG || level == ERROR_DEBUG) { if (!isDebugging() ) return; } int severity = IStatus.OK; switch (level) { case INFO_DEBUG : case INFO : severity = IStatus.INFO; break; case WARNING_DEBUG : case WARNING : severity = IStatus.WARNING; break; case ERROR_DEBUG : case ERROR : severity = IStatus.ERROR; } Status statusObj = new Status(severity, PLUGIN_ID, severity, message, exception); if (bundle != null) Platform.getLog(bundle).log(statusObj); } /** * Prints message to log if category matches /debug/tracefilter option. * * @param message * text to print * @param category * category of the message, to be compared with * /debug/tracefilter */ protected void _trace(String category, String message, Throwable exception) { if (!isDebugging() ) return; String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION); if (traceFilter != null) { StringTokenizer tokenizer = new StringTokenizer(traceFilter, ","); //$NON-NLS-1$ while (tokenizer.hasMoreTokens() ) { String cat = tokenizer.nextToken().trim(); if (category.equals(cat) ) { Status statusObj = new Status(IStatus.OK, PLUGIN_ID, IStatus.OK, message, exception); Bundle bundle = Platform.getBundle(PLUGIN_ID); if (bundle != null) Platform.getLog(bundle).log(statusObj); return; } } } } /** * @return true if the platform is debugging */ public boolean isDebugging() { return Platform.inDebugMode(); } public void log(int level, String message) { _log(level, message, null); } public void log(int level, String message, Throwable exception) { _log(level, message, exception); } public void logException(String message, Throwable exception) { _log(ERROR, message, exception); } public void logException(Throwable exception) { _log(ERROR, exception.getMessage(), exception); } public void trace(String category, String message) { _trace(category, message, null); } public void traceException(String category, String message, Throwable exception) { _trace(category, message, exception); } public void traceException(String category, Throwable exception) { _trace(category, exception.getMessage(), exception); } /** * Only for completeness - please use the more specific log/trace methods. * @param status */ public void log(IStatus status) { Platform.getLog(bundle).log(status); } } |
From: <max...@us...> - 2006-02-13 15:55:14
|
Update of /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse/src/org/hibernate/eclipse In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9238/src/org/hibernate/eclipse Removed Files: EclipseLogger.java Log Message: fix license issues --- EclipseLogger.java DELETED --- |
From: <max...@us...> - 2006-02-13 15:55:12
|
Update of /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/xpl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9166/src/org/hibernate/eclipse/logging/xpl Log Message: Directory /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse/src/org/hibernate/eclipse/logging/xpl added to the repository |
Update of /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7958/test/org/hibernate/test/hql Modified Files: BulkManipulationTest.java SimpleEntityWithAssociation.hbm.xml SimpleEntityWithAssociation.java Log Message: HHH-1419 Index: BulkManipulationTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/hql/BulkManipulationTest.java,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- BulkManipulationTest.java 10 Feb 2006 17:30:40 -0000 1.51 +++ BulkManipulationTest.java 13 Feb 2006 15:50:52 -0000 1.52 @@ -82,6 +82,35 @@ s.close(); } + public void testTempTableGenerationIsolation() throws Throwable{ + Session s = openSession(); + s.beginTransaction(); + + Truck truck = new Truck(); + truck.setVin( "123t" ); + truck.setOwner( "Steve" ); + s.save( truck ); + + // manually flush the session to ensure the insert happens + s.flush(); + + // now issue a bulk delete against Car which should force the temp table to be + // created. we need to test to ensure that this does not cause the transaction + // to be committed... + s.createQuery( "delete from Vehicle" ).executeUpdate(); + + s.getTransaction().rollback(); + s.close(); + + s = openSession(); + s.beginTransaction(); + List list = s.createQuery( "from Car" ).list(); + assertEquals( "temp table gen caused premature commit", 0, list.size() ); + s.createQuery( "delete from Car" ).executeUpdate(); + s.getTransaction().rollback(); + s.close(); + } + // INSERTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -375,6 +404,7 @@ // UPDATES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public void testUpdateWithWhereExistsSubquery() { + // multi-table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Session s = openSession(); Transaction t = s.beginTransaction(); Human joe = new Human(); @@ -403,6 +433,46 @@ s.delete( joe ); t.commit(); s.close(); + + // single-table (one-to-many & many-to-many) ~~~~~~~~~~~~~~~~~~~~~~~~~~ + s = openSession(); + t = s.beginTransaction(); + SimpleEntityWithAssociation entity = new SimpleEntityWithAssociation(); + SimpleEntityWithAssociation other = new SimpleEntityWithAssociation(); + entity.setName( "main" ); + other.setName( "many-to-many-association" ); + entity.getManyToManyAssociatedEntities().add( other ); + entity.addAssociation( "one-to-many-association" ); + s.save( entity ); + t.commit(); + s.close(); + + s = openSession(); + t = s.beginTransaction(); + // one-to-many test + updateQryString = "update SimpleEntityWithAssociation e " + + "set e.name = 'updated' " + + "where exists (" + + " select a.id " + + " from e.associatedEntities a " + + " where a.name = 'one-to-many-association' " + + ")"; + count = s.createQuery( updateQryString ).executeUpdate(); + assertEquals( 1, count ); + // many-to-many test + updateQryString = "update SimpleEntityWithAssociation e " + + "set e.name = 'updated' " + + "where exists (" + + " select a.id " + + " from e.manyToManyAssociatedEntities a " + + " where a.name = 'many-to-many-association' " + + ")"; + count = s.createQuery( updateQryString ).executeUpdate(); + assertEquals( 1, count ); + s.delete( entity.getManyToManyAssociatedEntities().iterator().next() ); + s.delete( entity ); + t.commit(); + s.close(); } public void testIncrementCounterVersion() { @@ -725,35 +795,6 @@ // DELETES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - public void testTempTableGenerationIsolation() throws Throwable{ - Session s = openSession(); - s.beginTransaction(); - - Truck truck = new Truck(); - truck.setVin( "123t" ); - truck.setOwner( "Steve" ); - s.save( truck ); - - // manually flush the session to ensure the insert happens - s.flush(); - - // now issue a bulk delete against Car which should force the temp table to be - // created. we need to test to ensure that this does not cause the transaction - // to be committed... - s.createQuery( "delete from Vehicle" ).executeUpdate(); - - s.getTransaction().rollback(); - s.close(); - - s = openSession(); - s.beginTransaction(); - List list = s.createQuery( "from Car" ).list(); - assertEquals( "temp table gen caused premature commit", 0, list.size() ); - s.createQuery( "delete from Car" ).executeUpdate(); - s.getTransaction().rollback(); - s.close(); - } - public void testDeleteWithSubquery() { // setup the test data... Session s = openSession(); Index: SimpleEntityWithAssociation.hbm.xml =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/hql/SimpleEntityWithAssociation.hbm.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SimpleEntityWithAssociation.hbm.xml 13 Jan 2006 16:09:25 -0000 1.1 +++ SimpleEntityWithAssociation.hbm.xml 13 Feb 2006 15:50:52 -0000 1.2 @@ -15,6 +15,10 @@ <key column="SIMPLE_1_ID"/> <one-to-many class="SimpleAssociatedEntity"/> </set> + <set name="manyToManyAssociatedEntities" cascade="save-update" inverse="false" lazy="true" table="MANY_TO_MANY"> + <key column="IN_ID"/> + <many-to-many class="SimpleEntityWithAssociation" column="OUT_ID"/> + </set> </class> <class name="SimpleAssociatedEntity" table="SIMPLE_2"> Index: SimpleEntityWithAssociation.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/hql/SimpleEntityWithAssociation.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SimpleEntityWithAssociation.java 13 Jan 2006 16:09:25 -0000 1.1 +++ SimpleEntityWithAssociation.java 13 Feb 2006 15:50:52 -0000 1.2 @@ -10,6 +10,7 @@ private Long id; private String name; private Set associatedEntities = new HashSet(); + private Set manyToManyAssociatedEntities = new HashSet(); public SimpleEntityWithAssociation() { } @@ -58,4 +59,12 @@ throw new IllegalArgumentException( "SimpleAssociatedEntity [" + association + "] not currently bound to this [" + this + "]" ); } } + + public Set getManyToManyAssociatedEntities() { + return manyToManyAssociatedEntities; + } + + public void setManyToManyAssociatedEntities(Set manyToManyAssociatedEntities) { + this.manyToManyAssociatedEntities = manyToManyAssociatedEntities; + } } |
From: <ste...@us...> - 2006-02-13 15:50:37
|
Update of /cvsroot/hibernate/Hibernate3/src/org/hibernate/hql/ast In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7842/src/org/hibernate/hql/ast Modified Files: HqlSqlWalker.java Log Message: HHH-1419 Index: HqlSqlWalker.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/src/org/hibernate/hql/ast/HqlSqlWalker.java,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- HqlSqlWalker.java 22 Dec 2005 20:17:23 -0000 1.115 +++ HqlSqlWalker.java 13 Feb 2006 15:50:28 -0000 1.116 @@ -813,8 +813,11 @@ } public FromClause getFinalFromClause() { - //TODO: more correct implementation - return currentFromClause; + FromClause top = currentFromClause; + while ( top.getParentFromClause() != null ) { + top = top.getParentFromClause(); + } + return top; } public boolean isShallowQuery() { |
From: <ste...@us...> - 2006-02-13 15:50:36
|
Update of /cvsroot/hibernate/Hibernate3/src/org/hibernate/hql/ast/tree In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7842/src/org/hibernate/hql/ast/tree Modified Files: FromElementType.java Log Message: HHH-1419 Index: FromElementType.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/src/org/hibernate/hql/ast/tree/FromElementType.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- FromElementType.java 10 Feb 2006 17:30:19 -0000 1.6 +++ FromElementType.java 13 Feb 2006 15:50:27 -0000 1.7 @@ -5,6 +5,7 @@ import org.hibernate.MappingException; import org.hibernate.QueryException; +import org.hibernate.util.ArrayHelper; import org.hibernate.engine.JoinSequence; import org.hibernate.hql.CollectionProperties; import org.hibernate.hql.CollectionSubqueryFactory; @@ -308,20 +309,66 @@ return new String[]{"(" + subquery + ")"}; } else { - // decide if we need to use table-alias qualification - boolean useTableAlias = fromElement.getWalker().getStatementType() == HqlSqlTokenTypes.SELECT - || fromElement.getWalker().getCurrentClauseType() == HqlSqlTokenTypes.SELECT - || fromElement.getWalker().isSubQuery() - || forceAlias; - if ( useTableAlias ) { + if ( forceAlias ) { return propertyMapping.toColumns( tableAlias, path ); } + else if ( fromElement.getWalker().getStatementType() == HqlSqlTokenTypes.SELECT ) { + return propertyMapping.toColumns( tableAlias, path ); + } + else if ( fromElement.getWalker().getCurrentClauseType() == HqlSqlTokenTypes.SELECT ) { + return propertyMapping.toColumns( tableAlias, path ); + } + else if ( fromElement.getWalker().isSubQuery() ) { + // for a subquery, the alias to use depends on a few things (we + // already know this is not an overall SELECT): + // 1) if this FROM_ELEMENT represents a correlation to the + // outer-most query + // A) if the outer query represents a multi-table + // persister, we need to use the given alias + // in anticipation of one of the multi-table + // executors being used (as this subquery will + // actually be used in the "id select" phase + // of that multi-table executor) + // B) otherwise, we need to use the persister's + // table name as the column qualification + // 2) otherwise (not correlated), use the given alias + if ( isCorrelation() ) { + if ( isMultiTable() ) { + return propertyMapping.toColumns( tableAlias, path ); + } + else { + return propertyMapping.toColumns( extractTableName(), path ); + } + } + else { + return propertyMapping.toColumns( tableAlias, path ); + } + } else { - return propertyMapping.toColumns( path ); + String[] columns = propertyMapping.toColumns( path ); + log.warn( "Using non-qualified column reference [" + path + " -> (" + ArrayHelper.toString( columns ) + ")]" ); + return columns; } } } + private boolean isCorrelation() { + FromClause top = fromElement.getWalker().getFinalFromClause(); + return fromElement.getFromClause() != fromElement.getWalker().getCurrentFromClause() && + fromElement.getFromClause() == top; + } + + private boolean isMultiTable() { + // should be safe to only ever expect EntityPersister references here + return fromElement.getQueryable() != null && + fromElement.getQueryable().isMultiTable(); + } + + private String extractTableName() { + // should be safe to only ever expect EntityPersister references here + return fromElement.getQueryable().getTableName(); + } + PropertyMapping getPropertyMapping(String propertyName) { checkInitialized(); if ( queryableCollection == null ) { // Not a collection? |
From: <ste...@us...> - 2006-02-12 14:29:29
|
Update of /cvsroot/hibernate/Hibernate3/test/org/hibernate/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17817/test/org/hibernate/test Modified Files: TestCase.java Log Message: minor Index: TestCase.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/TestCase.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- TestCase.java 18 Jan 2006 06:33:14 -0000 1.26 +++ TestCase.java 12 Feb 2006 14:29:21 -0000 1.27 @@ -42,8 +42,8 @@ return true; } - public TestCase(String x) { - super(x); + public TestCase(String name) { + super( name ); } protected void configure(Configuration cfg) {} |
From: <epb...@us...> - 2006-02-12 11:38:20
|
Update of /cvsroot/hibernate/HibernateExt/metadata/src/test/org/hibernate/test/annotations/inheritance In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29362/metadata/src/test/org/hibernate/test/annotations/inheritance Modified Files: SubclassTest.java Log Message: ANN-223 Index: SubclassTest.java =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/metadata/src/test/org/hibernate/test/annotations/inheritance/SubclassTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- SubclassTest.java 4 Jan 2006 00:43:48 -0000 1.8 +++ SubclassTest.java 12 Feb 2006 11:37:55 -0000 1.9 @@ -114,6 +114,7 @@ s = openSession(); tx = s.beginTransaction(); + assertEquals( 1, s.createQuery( "select count(*) from Fruit f where f.class = 'Apple'").uniqueResult() ); List result = s.createCriteria(Fruit.class).list(); assertNotNull(result); assertEquals( 2, result.size() ); |
From: <epb...@us...> - 2006-02-12 11:38:18
|
Update of /cvsroot/hibernate/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29362/metadata/src/java/org/hibernate/cfg/annotations Modified Files: EntityBinder.java Log Message: ANN-223 Index: EntityBinder.java =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/metadata/src/java/org/hibernate/cfg/annotations/EntityBinder.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- EntityBinder.java 6 Feb 2006 09:16:00 -0000 1.39 +++ EntityBinder.java 12 Feb 2006 11:37:54 -0000 1.40 @@ -147,7 +147,7 @@ //persistentClass.setDynamic(false); //no longer needed with the Entity name refactoring? persistentClass.setEntityName( annotatedClass.getName() ); if ( StringHelper.isEmpty( discriminatorValue ) ) { - persistentClass.setDiscriminatorValue( persistentClass.getEntityName() ); + persistentClass.setDiscriminatorValue( name ); } else { persistentClass.setDiscriminatorValue( discriminatorValue ); |
From: <epb...@us...> - 2006-02-12 11:38:12
|
Update of /cvsroot/hibernate/HibernateExt/metadata/src/test/org/hibernate/test/annotations/collectionelement In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29362/metadata/src/test/org/hibernate/test/annotations/collectionelement Modified Files: CountryAttitude.java Log Message: ANN-223 Index: CountryAttitude.java =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/metadata/src/test/org/hibernate/test/annotations/collectionelement/CountryAttitude.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CountryAttitude.java 5 Jan 2006 11:40:18 -0000 1.2 +++ CountryAttitude.java 12 Feb 2006 11:37:55 -0000 1.3 @@ -3,6 +3,7 @@ import javax.persistence.Embeddable; import javax.persistence.ManyToOne; +import javax.persistence.Column; import org.hibernate.test.annotations.Country; @@ -34,6 +35,7 @@ this.country = country; } + @Column(name="b_likes") public boolean isLikes() { return likes; } |
From: <ste...@us...> - 2006-02-12 02:47:49
|
Update of /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/legacy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11843/test/org/hibernate/test/legacy Modified Files: CustomPersister.java Log Message: oops! Index: CustomPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/legacy/CustomPersister.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- CustomPersister.java 6 Dec 2005 05:14:56 -0000 1.29 +++ CustomPersister.java 12 Feb 2006 02:47:38 -0000 1.30 @@ -4,6 +4,7 @@ import java.io.Serializable; import java.util.Hashtable; import java.util.Map; +import java.util.Comparator; import org.hibernate.EntityMode; import org.hibernate.Hibernate; @@ -606,11 +607,8 @@ public Object[] getNaturalIdentifierSnapshot(Serializable id, SessionImplementor session) throws HibernateException { return null; } - -} - - - - - + public Comparator getVersionComparator() { + return null; + } +} |
From: <one...@us...> - 2006-02-12 00:21:54
|
Update of /cvsroot/hibernate/Hibernate3/src/org/hibernate/persister/entity In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31972/src/org/hibernate/persister/entity Modified Files: AbstractEntityPersister.java Log Message: improve error msg Index: AbstractEntityPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/src/org/hibernate/persister/entity/AbstractEntityPersister.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- AbstractEntityPersister.java 9 Feb 2006 20:48:42 -0000 1.27 +++ AbstractEntityPersister.java 12 Feb 2006 00:21:44 -0000 1.28 @@ -3397,7 +3397,10 @@ else { String subclassEntityName = getSubclassEntityName( clazz ); if ( subclassEntityName == null ) { - throw new HibernateException( "instance not of expected entity type: " + getEntityName() ); + throw new HibernateException( + "instance not of expected entity type: " + clazz.getName() + + " is not a: " + getEntityName() + ); } else { return factory.getEntityPersister( subclassEntityName ); |
Update of /cvsroot/hibernate/HibernateExt/metadata/src/test/org/hibernate/test/annotations/embedded In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32332/metadata/src/test/org/hibernate/test/annotations/embedded Modified Files: EmbeddedTest.java Added Files: CorpType.java InternetProvider.java LegalStructure.java Manager.java Nationality.java Log Message: test suite for ANN-226 --- NEW FILE: CorpType.java --- //$Id: CorpType.java,v 1.1 2006/02/11 17:58:11 epbernard Exp $ package org.hibernate.test.annotations.embedded; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; /** * @author Emmanuel Bernard */ @Entity public class CorpType { private Integer id; private String type; @Id @GeneratedValue public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getType() { return type; } public void setType(String type) { this.type = type; } } --- NEW FILE: InternetProvider.java --- //$Id: InternetProvider.java,v 1.1 2006/02/11 17:58:11 epbernard Exp $ package org.hibernate.test.annotations.embedded; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.GeneratedValue; /** * @author Emmanuel Bernard */ @Entity public class InternetProvider { private Integer id; private String brandName; private LegalStructure owner; public String getBrandName() { return brandName; } public void setBrandName(String brandName) { this.brandName = brandName; } @Id @GeneratedValue public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public LegalStructure getOwner() { return owner; } public void setOwner(LegalStructure owner) { this.owner = owner; } } --- NEW FILE: LegalStructure.java --- //$Id: LegalStructure.java,v 1.1 2006/02/11 17:58:11 epbernard Exp $ package org.hibernate.test.annotations.embedded; import java.util.Set; import java.util.HashSet; import javax.persistence.Embeddable; import javax.persistence.ManyToOne; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; /** * @author Emmanuel Bernard */ @Embeddable public class LegalStructure { private String name; private String country; private CorpType corporationType; private Nationality origin; private Set<Manager> topManagement = new HashSet<Manager>(); @ManyToOne @JoinColumn(name="CORP_ID") public CorpType getCorporationType() { return corporationType; } public void setCorporationType(CorpType corporationType) { this.corporationType = corporationType; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getName() { return name; } public void setName(String name) { this.name = name; } @ManyToOne @JoinColumn(name="origin_fk") public Nationality getOrigin() { return origin; } public void setOrigin(Nationality origin) { this.origin = origin; } @OneToMany(mappedBy="employer") public Set<Manager> getTopManagement() { return topManagement; } public void setTopManagement(Set<Manager> topManagement) { this.topManagement = topManagement; } } --- NEW FILE: Manager.java --- //$Id: Manager.java,v 1.1 2006/02/11 17:58:11 epbernard Exp $ package org.hibernate.test.annotations.embedded; import javax.persistence.Entity; import javax.persistence.ManyToOne; import javax.persistence.Id; import javax.persistence.GeneratedValue; /** * @author Emmanuel Bernard */ @Entity public class Manager { private Integer id; private String name; private InternetProvider employer; @ManyToOne public InternetProvider getEmployer() { return employer; } public void setEmployer(InternetProvider employer) { this.employer = employer; } @Id @GeneratedValue public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } } --- NEW FILE: Nationality.java --- //$Id: Nationality.java,v 1.1 2006/02/11 17:58:11 epbernard Exp $ package org.hibernate.test.annotations.embedded; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.GeneratedValue; /** * @author Emmanuel Bernard */ @Entity public class Nationality { private Integer id; private String name; @Id @GeneratedValue public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } } Index: EmbeddedTest.java =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/metadata/src/test/org/hibernate/test/annotations/embedded/EmbeddedTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- EmbeddedTest.java 7 Oct 2005 18:23:27 -0000 1.7 +++ EmbeddedTest.java 11 Feb 2006 17:58:11 -0000 1.8 @@ -3,6 +3,7 @@ import java.io.Serializable; import java.util.List; +import java.util.Set; import org.hibernate.Query; import org.hibernate.Session; @@ -268,6 +269,77 @@ s.close(); } + public void testEmbeddedAndMultipleManyToOne() throws Exception { + Session s; + s = openSession(); + Transaction tx = s.beginTransaction(); + CorpType type = new CorpType(); + type.setType( "National" ); + s.persist( type ); + Nationality nat = new Nationality(); + nat.setName( "Canadian" ); + s.persist( nat ); + InternetProvider provider = new InternetProvider(); + provider.setBrandName( "Fido" ); + LegalStructure structure = new LegalStructure(); + structure.setCorporationType( type ); + structure.setCountry( "Canada" ); + structure.setName( "Rogers" ); + provider.setOwner( structure ); + structure.setOrigin( nat ); + s.persist( provider ); + tx.commit(); + s.close(); + + s = openSession(); + tx = s.beginTransaction(); + provider = (InternetProvider) s.get(InternetProvider.class, provider.getId() ); + assertNotNull( provider.getOwner() ); + assertNotNull( "Many to one not set", provider.getOwner().getCorporationType() ); + assertEquals( "Wrong link", type.getType(), provider.getOwner().getCorporationType().getType() ); + assertNotNull( "2nd Many to one not set", provider.getOwner().getOrigin() ); + assertEquals( "Wrong 2nd link", nat.getName(), provider.getOwner().getOrigin().getName() ); + s.delete( provider ); + s.delete( provider.getOwner().getCorporationType() ); + s.delete( provider.getOwner().getOrigin() ); + tx.commit(); + s.close(); + } + + public void testEmbeddedAndOneToMany() throws Exception { + Session s; + s = openSession(); + Transaction tx = s.beginTransaction(); + InternetProvider provider = new InternetProvider(); + provider.setBrandName( "Fido" ); + LegalStructure structure = new LegalStructure(); + structure.setCountry( "Canada" ); + structure.setName( "Rogers" ); + provider.setOwner( structure ); + s.persist( provider ); + Manager manager = new Manager(); + manager.setName( "Bill" ); + manager.setEmployer( provider ); + structure.getTopManagement().add(manager); + s.persist( manager ); + tx.commit(); + s.close(); + + s = openSession(); + tx = s.beginTransaction(); + provider = (InternetProvider) s.get(InternetProvider.class, provider.getId() ); + assertNotNull( provider.getOwner() ); + Set<Manager> topManagement = provider.getOwner().getTopManagement(); + assertNotNull( "OneToMany not set", topManagement ); + assertEquals( "Wrong number of elements", 1, topManagement.size() ); + manager = (Manager) topManagement.iterator().next(); + assertEquals( "Wrong element", "Bill", manager.getName() ); + s.delete( manager ); + s.delete( provider ); + tx.commit(); + s.close(); + } + public EmbeddedTest(String x) { super( x ); } @@ -279,7 +351,11 @@ AddressType.class, VanillaSwap.class, SpreadDeal.class, - Book.class + Book.class, + InternetProvider.class, + CorpType.class, + Nationality.class, + Manager.class }; } } |
From: <epb...@us...> - 2006-02-11 17:53:49
|
Update of /cvsroot/hibernate/HibernateExt/metadata In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30648/metadata Modified Files: build.xml Log Message: fix test suite regarding common-build changes Index: build.xml =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/metadata/build.xml,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- build.xml 12 Jan 2006 02:07:04 -0000 1.38 +++ build.xml 11 Feb 2006 17:53:40 -0000 1.39 @@ -24,7 +24,7 @@ <import file="${common.dir}/common-build.xml"/> - <target name="compile" depends="init" description="Compile the Java source code"> + <target name="compile" depends="init" description="Compile the Java source code"> <available classname="org.eclipse.core.launcher.Main" property="build.compiler" @@ -54,16 +54,16 @@ value="org.eclipse.jdt.core.JDTCompilerAdapter" classpath="${java.class.path}"/> <javac - srcdir="${test.dir}" - destdir="${classes.dir}" - classpathref="lib.class.path" + destdir="${testclasses.dir}" + classpathref="junit.classpath" debug="${javac.debug}" optimize="${javac.optimize}" nowarn="on" - source="1.5"> - <src path="${src.dir}"/> + source="1.5" + target="1.5"> + <src refid="testsrc.path"/> </javac> - </target> + </target> <path id="junit.moduleclasspath"> <pathelement location="${src.dir}"/> |
From: <ste...@us...> - 2006-02-11 03:39:18
|
Update of /cvsroot/hibernate/Hibernate3/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24959/lib Modified Files: jboss-cache.jar Log Message: new JBossCache jar (built from CVS) Index: jboss-cache.jar =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/lib/jboss-cache.jar,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 Binary files /tmp/cvsTw8coK and /tmp/cvsSXcLW8 differ |
From: <epb...@us...> - 2006-02-11 02:51:10
|
Update of /cvsroot/hibernate/HibernateExt/metadata/src/java/org/hibernate/cfg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11100/metadata/src/java/org/hibernate/cfg Modified Files: AnnotationBinder.java Log Message: ANN-146 ignore SingleTable in not null Index: AnnotationBinder.java =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/metadata/src/java/org/hibernate/cfg/AnnotationBinder.java,v retrieving revision 1.172 retrieving revision 1.173 diff -u -d -r1.172 -r1.173 --- AnnotationBinder.java 10 Feb 2006 16:32:55 -0000 1.172 +++ AnnotationBinder.java 11 Feb 2006 02:50:57 -0000 1.173 @@ -102,6 +102,7 @@ import org.hibernate.mapping.Subclass; import org.hibernate.mapping.Table; import org.hibernate.mapping.UnionSubclass; +import org.hibernate.mapping.SingleTableSubclass; import org.hibernate.persister.entity.JoinedSubclassEntityPersister; import org.hibernate.persister.entity.SingleTableEntityPersister; import org.hibernate.persister.entity.UnionSubclassEntityPersister; @@ -418,7 +419,7 @@ persistentClass = new RootClass(); } else if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.type ) ) { - persistentClass = new Subclass( superEntity ); + persistentClass = new SingleTableSubclass( superEntity ); } else if ( InheritanceType.JOINED.equals( inheritanceState.type ) ) { persistentClass = new JoinedSubclass( superEntity ); |
From: <epb...@us...> - 2006-02-11 02:51:10
|
Update of /cvsroot/hibernate/HibernateExt/metadata/src/java/org/hibernate/validator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11100/metadata/src/java/org/hibernate/validator Modified Files: NotNullValidator.java Log Message: ANN-146 ignore SingleTable in not null Index: NotNullValidator.java =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/metadata/src/java/org/hibernate/validator/NotNullValidator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NotNullValidator.java 18 Sep 2005 23:26:49 -0000 1.3 +++ NotNullValidator.java 11 Feb 2006 02:50:57 -0000 1.4 @@ -6,6 +6,7 @@ import org.hibernate.mapping.Column; import org.hibernate.mapping.Property; +import org.hibernate.mapping.SingleTableSubclass; /** * Check a not null restriction on an object @@ -24,9 +25,12 @@ @SuppressWarnings("unchecked") public void apply(Property property) { - Iterator<Column> iter = (Iterator<Column>) property.getColumnIterator(); - while ( iter.hasNext() ) { - iter.next().setNullable( false ); + if ( ! ( property.getPersistentClass() instanceof SingleTableSubclass ) ) { + //single table should not be forced to null + Iterator<Column> iter = (Iterator<Column>) property.getColumnIterator(); + while ( iter.hasNext() ) { + iter.next().setNullable( false ); + } } } } |
From: <epb...@us...> - 2006-02-11 02:51:10
|
Update of /cvsroot/hibernate/HibernateExt/metadata/src/test/org/hibernate/validator/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11100/metadata/src/test/org/hibernate/validator/test Modified Files: HibernateAnnotationIntegrationTest.java Added Files: Music.java Rock.java Log Message: ANN-146 ignore SingleTable in not null --- NEW FILE: Music.java --- //$Id: Music.java,v 1.1 2006/02/11 02:50:57 epbernard Exp $ package org.hibernate.validator.test; import javax.persistence.Entity; import javax.persistence.Id; /** * @author Emmanuel Bernard */ @Entity public class Music { @Id public String name; } --- NEW FILE: Rock.java --- //$Id: Rock.java,v 1.1 2006/02/11 02:50:57 epbernard Exp $ package org.hibernate.validator.test; import javax.persistence.Entity; import org.hibernate.validator.NotNull; /** * @author Emmanuel Bernard */ @Entity public class Rock extends Music { @NotNull public Integer bit; } Index: HibernateAnnotationIntegrationTest.java =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/metadata/src/test/org/hibernate/validator/test/HibernateAnnotationIntegrationTest.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- HibernateAnnotationIntegrationTest.java 10 Feb 2006 16:32:56 -0000 1.10 +++ HibernateAnnotationIntegrationTest.java 11 Feb 2006 02:50:57 -0000 1.11 @@ -42,6 +42,12 @@ assertEquals( "Validator annotations not applied on associations", false, serialColumn.isNullable() ); } + public void testSingleTableAvoidNotNull() throws Exception { + PersistentClass classMapping = getCfg().getClassMapping( Rock.class.getName() ); + Column serialColumn = (Column) classMapping.getProperty("bit").getColumnIterator().next(); + assertTrue( "Notnull should not be applised on single tables", serialColumn.isNullable() ); + } + public void testEvents() throws Exception { Session s; Transaction tx; @@ -151,7 +157,9 @@ Martian.class, Venusian.class, Tv.class, - TvOwner.class + TvOwner.class, + Music.class, + Rock.class }; } |
From: <epb...@us...> - 2006-02-11 02:44:47
|
Update of /cvsroot/hibernate/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9090/tools/src/test/org/hibernate/tool/hbm2x Modified Files: Hbm2JavaTest.java Log Message: left over the Singletable class creation Index: Hbm2JavaTest.java =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/tools/src/test/org/hibernate/tool/hbm2x/Hbm2JavaTest.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- Hbm2JavaTest.java 31 Jan 2006 08:26:27 -0000 1.26 +++ Hbm2JavaTest.java 11 Feb 2006 02:44:38 -0000 1.27 @@ -16,7 +16,7 @@ import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.Property; import org.hibernate.mapping.RootClass; -import org.hibernate.mapping.Subclass; +import org.hibernate.mapping.SingleTableSubclass; import org.hibernate.tool.NonReflectiveTestCase; import org.hibernate.tool.hbm2x.pojo.BasicPOJOClass; import org.hibernate.tool.hbm2x.pojo.ImportContext; @@ -246,7 +246,7 @@ PersistentClass base = new RootClass(); base.setClassName( "Base" ); - PersistentClass sub = new Subclass( base ); + PersistentClass sub = new SingleTableSubclass( base ); sub.setClassName( "Sub" ); assertEquals( null, c2j.getPOJOClass(base).getExtends() ); |
From: <epb...@us...> - 2006-02-11 01:04:10
|
Update of /cvsroot/hibernate/HibernateExt/metadata/src/java/org/hibernate/validator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8518/metadata/src/java/org/hibernate/validator Modified Files: ClassValidator.java Log Message: ANN-211 Index: ClassValidator.java =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/metadata/src/java/org/hibernate/validator/ClassValidator.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- ClassValidator.java 9 Dec 2005 14:37:03 -0000 1.18 +++ ClassValidator.java 11 Feb 2006 01:04:02 -0000 1.19 @@ -211,6 +211,7 @@ /** * apply constraints on a bean instance and return all the failures. + * if <code>bean</code> is null, an empty array is returned */ public InvalidValue[] getInvalidValues(T bean) { return this.getInvalidValues( bean, new IdentitySet() ); @@ -218,9 +219,10 @@ /** * apply constraints on a bean instance and return all the failures. + * if <code>bean</code> is null, an empty array is returned */ protected InvalidValue[] getInvalidValues(T bean, Set<Object> circularityState) { - if ( circularityState.contains( bean ) ) { + if ( bean == null || circularityState.contains( bean ) ) { return EMPTY_INVALID_VALUE_ARRAY; //Avoid circularity } else { |
From: <max...@us...> - 2006-02-10 18:25:40
|
Update of /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse.console.test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1757 Modified Files: build.properties Log Message: added missing libs to build Index: build.properties =================================================================== RCS file: /cvsroot/hibernate/HibernateExt/org.hibernate.eclipse.console.test/build.properties,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- build.properties 8 Feb 2006 08:02:03 -0000 1.4 +++ build.properties 10 Feb 2006 18:25:30 -0000 1.5 @@ -3,4 +3,6 @@ bin.includes = plugin.xml,\ org.hibernate.eclipse.console.test.test/,\ META-INF/,\ - lib/hibernate-tools-tests.jar + lib/hibernate-tools-tests.jar,\ + lib/hsqldb.jar,\ + lib/jaxen-1.1-beta-7.jar |
From: <ste...@us...> - 2006-02-10 17:30:49
|
Update of /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/hql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4063/test/org/hibernate/test/hql Modified Files: BulkManipulationTest.java Log Message: HHH-1419 : bulk deletes/updates, subqueries and column qualifications Index: BulkManipulationTest.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate3/test/org/hibernate/test/hql/BulkManipulationTest.java,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- BulkManipulationTest.java 18 Jan 2006 06:33:26 -0000 1.50 +++ BulkManipulationTest.java 10 Feb 2006 17:30:40 -0000 1.51 @@ -3,6 +3,7 @@ import java.util.Date; import java.util.List; +import java.util.ArrayList; import junit.framework.Test; import junit.framework.TestSuite; @@ -373,6 +374,37 @@ // UPDATES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + public void testUpdateWithWhereExistsSubquery() { + Session s = openSession(); + Transaction t = s.beginTransaction(); + Human joe = new Human(); + joe.setName( new Name( "Joe", 'Q', "Public" ) ); + s.save( joe ); + Human doll = new Human(); + doll.setName( new Name( "Kyu", 'P', "Doll" ) ); + doll.setFriends( new ArrayList() ); + doll.getFriends().add( joe ); + s.save( doll ); + t.commit(); + s.close(); + + s = openSession(); + t = s.beginTransaction(); + String updateQryString = "update Human h " + + "set h.description = 'updated' " + + "where exists (" + + " select f.id " + + " from h.friends f " + + " where f.name.last = 'Public' " + + ")"; + int count = s.createQuery( updateQryString ).executeUpdate(); + assertEquals( 1, count ); + s.delete( doll ); + s.delete( joe ); + t.commit(); + s.close(); + } + public void testIncrementCounterVersion() { Session s = openSession(); Transaction t = s.beginTransaction(); |