Skip to content

Commit 79ad004

Browse files
committed
Fix JDBC-175
Make regex non-greedy
1 parent 5addcf0 commit 79ad004

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/clojure/clojure/java/jdbc/datafy.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
If a column name ends with _id or id, it is assumed to be a foreign key
5252
into the table identified by the first part of the column name."
5353
[col]
54-
(let [[_ table] (re-find #"^(.*)_?id$" (name col))]
54+
(let [[_ table] (re-find #"^(.*?)_?id$" (name col))]
5555
(when table
5656
[(keyword table) :id])))
5757

0 commit comments

Comments
 (0)