This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grailsClass.metaClass.withOptimisticLocking = { Long timeout = 3000L, Closure cls -> | |
def startTime = new Date().time | |
def duration = 0 | |
def attempts = 0 | |
while (true) { | |
try { | |
attempts++ | |
cls.call() | |
break | |
} catch (OptimisticLockingFailureException e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["super+shift+k"], "command": "reveal_in_side_bar"} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"color_scheme": "Packages/User/Solarized (Dark) (SL).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"save_on_focus_lost": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Why HQL? | |
Cause: | |
* Criteria + projections + join = "joins are ignored" | |
* Criteria + projections + forced join = "joins not ignored but joined tables are fetched lazy" | |
* HQL do not need explicit join clauses; joins are inferred automatically for one-to-one & many-to-one associations | |
* GORM criteria is buggy | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SkuProfilesController { | |
def skuProfileService | |
def show() { | |
paramsSplit(['ids', 'fields']) | |
def cmd = bindData(new ListSkuProfilesCommand(), params) | |
if (!cmd.validate()) { | |
throw new EntityValidationException(cmd.errors) | |
} |
NewerOlder