assertTrue(second.id > first.id);
}
public void testRelationship() {
Discovery radioactivity = new Discovery("Radioactivity", LongAutoID_CURIE);
Discovery relativity = new Discovery("Relativity", LongAutoID_EINSTEIN);
Discovery teslaCoil = new Discovery("Tesla Coil", LongAutoID_TESLA);
Discovery foo = new Discovery(null, LongAutoID_TESLA);
pm.insert(radioactivity);
pm.insert(relativity);
pm.insert(teslaCoil);
pm.insert(foo);
Discovery relativity2 = pm.createQuery(Discovery.class).filter("discoverer", LongAutoID_EINSTEIN).get();
assertTrue(relativity.name.equals(relativity2.name));
Discovery foo2 = pm.createQuery(Discovery.class).filter("name", null).get();
assertTrue(foo.id.equals(foo2.id));
}