Skip to content

Commit

Permalink
update hibernate version that fixes https://luceeserver.atlassian.net…
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Jul 18, 2017
1 parent ffce905 commit 67d2ece
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 22 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ Require-Extension: 7E673D15-D87C-41A6-8B5F1956528C605F;name=MySQL;label=MySQL;ve
17AB52DE-B300-A94B-E058BD978511E39E;name=S3;label=S3;version=0.9.4.113,
87FE44E5-179C-43A3-A87B3D38BEF4652E;name=EHCache;label=EHCache;version=2.10.0.21,
D46B46A9-A0E3-44E1-D972A04AC3A8DC10;name=Chart;label=CFChart;version=1.0.19.23,
FAD1E8CB-4F45-4184-86359145767C29DE;name=Hibernate;label=Hibernate;version=3.5.5.63,
FAD1E8CB-4F45-4184-86359145767C29DE;name=Hibernate;label=Hibernate;version=3.5.5.64,
EFDEB172-F52E-4D84-9CD1A1F561B3DFC8;name=Lucene;label=Lucene;version=2.4.1.29,
66E312DD-D083-27C0-64189D16753FD6F0;name=PDF;label=PDF;version=1.0.0.62,
FAD67145-E3AE-30F8-1C11A6CCF544F0B7;name=Form;label=Form tags;version=1.0.0.7;since=5.1.0.21
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="core" basedir="." name="Lucee" xmlns:artifact="antlib:org.apache.maven.artifact.ant">

<property name="version" value="5.2.3.10-SNAPSHOT"/>
<property name="version" value="5.2.3.11-SNAPSHOT"/>

<path id="maven-ant-tasks.classpath" path="../ant/lib/maven-ant-tasks-2.1.3.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>5.2.3.10-SNAPSHOT</version>
<version>5.2.3.11-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down
17 changes: 16 additions & 1 deletion test/tickets/LDEV1229.cfc
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
component extends="org.lucee.cfml.test.LuceeTestCase"{
function run( testResults , testBox ) {
describe( title="Test suite for LDEV-1229", skip=checkMySqlEnvVarsAvailable(), body=function() {

describe( title="Test suite for LDEV-1229 with mysql", skip=checkMySqlEnvVarsAvailable(), body=function() {
it(title="checking property tag, with the attribute cascade = 'all-delete-orphan' ", body = function( currentSpec ) {
var uri=createURI("LDEV1229/index.cfm");
var result = _InternalRequest(
template:uri
,urls:{db:'mysql'}
);
expect(result.filecontent.trim()).toBe(1);
});
});

describe( title="Test suite for LDEV-1229 with h2", body=function() {
it(title="checking property tag, with the attribute cascade = 'all-delete-orphan' ", body = function( currentSpec ) {
var uri=createURI("LDEV1229/index.cfm");
var result = _InternalRequest(
template:uri
,urls:{db:'h2'}
);
expect(result.filecontent.trim()).toBe(1);
});
});


}
// private Function//
private string function createURI(string calledName){
Expand Down
50 changes: 32 additions & 18 deletions test/tickets/LDEV1229/Application.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,29 @@ component {

this.name = 'test';
this.sessionManagement = false;
mySQL = getCredentials();
if(mySQL.count()!=0){
this.datasource="#{
class: 'org.gjt.mm.mysql.Driver'
, bundleName:'com.mysql.jdbc'
, bundleVersion:'5.1.38'
, connectionString: 'jdbc:mysql://'&mySQL.server&':'&mySQL.port&'/'&mySQL.database&'?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true'
, username: mySQL.username
, password: mySQL.password
}#";

if(url.db=='h2') {
this.datasource={
class: 'org.h2.Driver'
, bundleName:"org.h2"
, connectionString: 'jdbc:h2:#getDirectoryFromPath(getCurrentTemplatePath())#/datasource/db;MODE=MySQL'
};

}
else {
mySQL = getCredentials();
if(mySQL.count()!=0){
this.datasource={
class: 'org.gjt.mm.mysql.Driver'
, bundleName:'com.mysql.jdbc'
, bundleVersion:'5.1.38'
, connectionString: 'jdbc:mysql://'&mySQL.server&':'&mySQL.port&'/'&mySQL.database&'?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true'
, username: mySQL.username
, password: mySQL.password
};
}
}

// ORM settings
this.ormEnabled = true;
this.ormSettings = {
Expand All @@ -21,9 +33,10 @@ component {
,dialect = "MySQLwithInnoDB"
};
function onRequestStart(){

query {
echo("SET FOREIGN_KEY_CHECKS=0");
if(url.db=='mysql') {
query {
echo("SET FOREIGN_KEY_CHECKS=0");
}
}
query {
echo("DROP TABLE IF EXISTS `child`");
Expand All @@ -36,19 +49,21 @@ component {
`ID` int(10) unsigned NOT NULL,
`parentID` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
);");
}
query {
echo("CREATE TABLE `parent` (
`ID` int(10) unsigned NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
);");
}
query {
echo("INSERT INTO `parent` VALUES ('1');");
}
query {
echo("SET FOREIGN_KEY_CHECKS=1");
if(url.db=='mysql') {
query {
echo("SET FOREIGN_KEY_CHECKS=1");
}
}
}

Expand Down Expand Up @@ -82,5 +97,4 @@ component {
}
return mysql;
}

}

0 comments on commit 67d2ece

Please sign in to comment.