Skip to content

Instantly share code, notes, and snippets.

@ymauray
ymauray / show_constraints.sql
Last active July 13, 2016 08:29
Find all tables referencing a given table's primary key
SELECT S.TABLE_NAME SOURCE,
S.CONSTRAINT_NAME CONTRAINTE,
T.TABLE_NAME CIBLE,
T.CONSTRAINT_NAME PK
FROM USER_CONSTRAINTS S,
USER_CONSTRAINTS T
WHERE T.TABLE_NAME = '<target_table>'
AND T.CONSTRAINT_TYPE = 'P'
AND S.R_CONSTRAINT_NAME = T.CONSTRAINT_NAME;
---
@ymauray
ymauray / demo.adoc
Last active April 11, 2016 12:45
Démo AsciiDoctor

PressCast: The ultimate book.

Ce bouquin est génialissime. Merci d’avoir lu PressCast: The ultimate book..

Core concepts

import com.mysema.query.codegen.GenericExporter
import com.mysema.query.codegen.Keywords
import javax.persistence.Embeddable
import javax.persistence.Embedded
import javax.persistence.Entity
import javax.persistence.MappedSuperclass
import javax.persistence.Transient
group 'yma'