Index: MSSQLServerAdapter.java =================================================================== RCS file: /cvsroot/jpox/JPOX/Core/src/java/org/jpox/store/rdbms/adapter/MSSQLServerAdapter.java,v retrieving revision 1.18 diff -u -r1.18 MSSQLServerAdapter.java --- MSSQLServerAdapter.java 5 Aug 2005 16:41:10 -0000 1.18 +++ MSSQLServerAdapter.java 19 Aug 2005 09:06:47 -0000 @@ -120,18 +120,8 @@ public String getSchemaName(Connection conn) throws SQLException { - /* - * As of version 7 there was no equivalent to the concept of "schema" - * in SQL Server. For DatabaseMetaData functions that include - * SCHEMA_NAME drivers usually return the user name that owns the table. - * - * So the default ProbeTable method for determining the current schema - * just ends up returning the current user. If we then use that name in - * performing metadata queries our results may get filtered down to just - * objects owned by that user. So instead we report the schema name as - * null which should cause those queries to return everything. - */ - return null; + String userName = conn.getMetaData().getUserName(); + return userName; } /** @@ -366,4 +356,17 @@ { return new MSSQLRDBMSMappingManager(); } + + public String getSelectWithLockOption() + { + return "(UPDLOCK)"; + } + + public boolean getPlaceWithOptionAfterFromClause() { + return true; + } + + public boolean getPlaceWithOptionWithinJoinClauses() { + return true; + } } \ No newline at end of file