Skip to content

Instantly share code, notes, and snippets.

View danielbaccin's full-sized avatar

Daniel Baccin danielbaccin

View GitHub Profile
@rponte
rponte / Parent.java
Last active April 7, 2021 04:46
Handling Hibernate (JPA) lazy association mapping when using @NotFound
@Entity
public class Parent {
@Id
private Long id;
@OneToOne(fetch = FetchType.LAZY)
@NotFound(action=NotFoundAction.IGNORE) // You don't need this annotation if you use the approach below
private Son son;
@rponte
rponte / .git-completion.sh
Last active November 7, 2019 18:59
Git prompt/console configuration (code completion and colorful prompt)
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names