My teacher taught me that compounds having intramolecular H-Bonding are relatively less soluble in water as they will not involve in H-Bonding with water appreciably while those able to do intermolecular H-Bonding will appreciably form H-Bonding with water, and thus the latter ones will be relatively more soluble in water.
Applying this logic will make maleic acid less soluble than fumaric, but that's not the case. Wikipedia shows 478.8g/L for maleic, while just 4.9g/L for fumaric. Can someone help me with where I am going wrong?