keredson / DKO

An ORM for people who hate ORMs.
GNU Lesser General Public License v2.1
49 stars 7 forks source link

Join hashCode bug #10

Open salynch opened 8 years ago

salynch commented 8 years ago

The second line of hashCode() calls super.hashCode(), which calls Table's hashCode(), which then proceeds to call Util.getFields(this.getClass())... which throws an exception for the Join class.

Stack trace:

WARNING: java.lang.NoSuchFieldException: _FIELDS --- DKO class Join was generated prior to DKO v2.2.0. falling back to FIELDS()... Exception in thread "main" java.lang.RuntimeException: java.lang.InstantiationException: org.kered.dko.Join at org.kered.dko.Util.getFIELDS(Util.java:170) at org.kered.dko.Util.getFields(Util.java:180) at org.kered.dko.Table.hashCode(Table.java:305) at org.kered.dko.Join.hashCode(Join.java:175) at java.util.HashMap.hash(HashMap.java:338) at java.util.HashMap.put(HashMap.java:611) at java.util.HashSet.add(HashSet.java:219) at org.kered.dko.AbstractQuery.asSet(AbstractQuery.java:228)

salynch commented 8 years ago

@keredson - I'm not crazy, right? This is a straight-up bug isn't it?