Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
App Blocks
Commits
f1ca6967
Commit
f1ca6967
authored
May 10, 2017
by
Matija Obreza
Browse files
BetterHSQLDialect allows mysql compatible use of @Lob (no length)
parent
de06e8c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/src/main/java/org/genesys/blocks/util/BetterHSQLDialect.java
0 → 100644
View file @
f1ca6967
package
org.genesys.blocks.util
;
import
java.sql.Types
;
import
org.hibernate.dialect.HSQLDialect
;
/**
* Hibernate's HSQL dialect uses clob(255) when length is not specified.
*
* Example: For JDBC connection to <code>jdbc:hsqldb:mem:catalog;sql.syntax_mys=true;sql.ignore_case=true</code>
* set Hibernate dialect to <code>org.genesys.blocks.util.BetterHSQLDialect</code>.
*/
public
class
BetterHSQLDialect
extends
HSQLDialect
{
// http://stackoverflow.com/questions/12876551/hibernate-4-1-with-hsqldb-gives-data-exception-string-data-right-truncation
public
BetterHSQLDialect
()
{
super
();
registerColumnType
(
Types
.
CLOB
,
"clob"
);
registerColumnType
(
Types
.
BLOB
,
"blob"
);
}
}
\ No newline at end of file
security/src/main/java/org/genesys/blocks/oauth/model/AccessToken.java
View file @
f1ca6967
...
...
@@ -35,14 +35,12 @@ public class AccessToken implements Serializable {
@Column
(
unique
=
true
,
length
=
100
)
private
String
authenticationId
;
@Lob
@Column
(
length
=
20
*
1024
)
private
byte
[]
token
;
@Column
(
length
=
100
)
private
String
username
;
@Column
(
length
=
100
)
private
String
clientId
;
@Lob
@Column
(
length
=
20
*
1024
)
private
byte
[]
authentication
;
@Column
(
length
=
100
)
private
String
refreshToken
;
...
...
security/src/main/java/org/genesys/blocks/oauth/model/RefreshToken.java
View file @
f1ca6967
...
...
@@ -34,11 +34,9 @@ public class RefreshToken implements Serializable {
private
String
tokenId
;
@Lob
@Column
(
length
=
20
*
1024
)
private
byte
[]
token
;
@Lob
@Column
(
length
=
20
*
1024
)
private
byte
[]
authentication
;
public
void
setTokenId
(
final
String
tokenId
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment