In Hibernate 5+ a change was made that requires an alternative naming strategy otherwise the name attribute on the Column annotation is ignored.
See
spring-projects/spring-boot#6264 (comment) https://stackoverflow.com/a/38875123/378151
In Hibernate 5+ a change was made that requires an alternative naming strategy otherwise the name attribute on the Column annotation is ignored.
See
spring-projects/spring-boot#6264 (comment) https://stackoverflow.com/a/38875123/378151
[alias] | |
######################################## | |
# Config commands | |
######################################## | |
editConfig = "!code ~/.gitconfig" | |
# setAuthor "Firstname Lastname" "email@gmail.com" | |
setAuthor = "!f(){ git config user.name $1 && git config user.email $2; }; f" |
# It's better to unpack these files and commit the raw source because | |
# git has its own built in compression methods. | |
*.7z | |
*.jar | |
*.rar | |
*.zip | |
*.gz | |
*.bzip | |
*.bz2 | |
*.xz |
package com.snekse.java.utils | |
import java.util.Collection; | |
import java.util.List; | |
import java.util.function.Function; | |
import java.util.stream.Collectors; | |
public class CollectionStreamUtil { | |
public static <T, R> List<R> mapToList(Collection<T> i, Function<T, R> f) { | |
return i.stream().map(f).collect(Collectors.toList()); |
const convertDataAttributes = dataAttributes => | |
Object.entries(dataAttributes) | |
.filter(([k, v]) => k.startsWith("data-")) | |
.reduce((acc, [k, v]) => { | |
const newKey = k.slice(5); //`data-` length | |
acc[newKey] = v; | |
return acc; | |
}, {}); |
// See https://runkit.com/snekse/yup-tests-string-defined/1.0.0
// and https://runkit.com/snekse/yup-tests-string-defined/2.0.0
yup.string().min(0).strict(true).nullable(true).notOneOf([undefined]);
// If we want to allow nulls, just add `.nullable(true)`
const schema = yup.string().min(0).strict(true).nullable(true).notOneOf([undefined]);
console.log(schema.isValidSync(""));
// See https://runkit.com/snekse/yup-tests-string-defined | |
yup.string().min(0).strict(true).nullable(true).notOneOf([undefined]); | |
// If we want to allow nulls, just add `.nullable(true)` | |
const schema = yup.string().min(0).strict(true).nullable(true).notOneOf([undefined]); | |
console.log(schema.isValidSync("")); |
/* eslint-disable no-console */ | |
const CHECK = "CHECK"; | |
const WHEN = "WHEN"; | |
const THEN = "THEN"; | |
const DEFAULT_INDENT = " "; | |
const DEFAULT_STEP_PAUSE = 50; | |
const DEFAULT_LOG_VALUE_MSG_FORMATTER_FN = (selector, result) => | |
`${DEFAULT_INDENT}${selector} value is "${result.value}" |
//All of the fancy annotations are mostly here if you want to generate the DDL via Hibernate | |
@Size(min = 10) // If you want to limit the max size of the array | |
@ElementCollection(fetch = FetchType.EAGER) | |
@CollectionTable(name = 'IssueRequestor', joinColumns = [@JoinColumn(name = 'IssueID')], | |
uniqueConstraints = [ @UniqueConstraint(name = 'IssueRequestor_uc_issueId_requestor', | |
columnNames = ['IssueID', 'requestor'])]) | |
@Column(name = 'requestor', length = 150) | |
Set<String> requestors = [] |
@TestConfiguration | |
class IntegrationTestMockingConfig { | |
private DetachedMockFactory factory = new DetachedMockFactory() | |
@Bean | |
ExternalRankingService externalRankingService() { | |
factory.Mock(ExternalRankingService) | |
} | |
} |