TITLE: Tensor product of a module with an ideal is isomorphic to their standard product
QUESTION [17 upvotes]: Let $A$ be a commutative ring and $M$ an $A$-module. Let $I$ be any ideal of $A$. 
We have an epimorphism $M \otimes_A I \rightarrow IM$. It seems to me that this is not in general an isomorphism. 
Q1: Any counterexample? 
If $M$ is flat, then $M \otimes_A I \cong IM$. However, flatness seems to be a too strong condition for this equality to be true for any ideal $I$. I am interested in finding a characterization of $M$ such that $M \otimes_A I \cong IM$ for any ideal $I$ of $A$. 
Q2: Any suggestions?

REPLY [4 votes]: It is easy to come up with a bunch of counterexampless, without knowing the notion of flatness, just by looking at simple special cases.
For $M=A/J$ we have $M \otimes_A I = I/IJ$, which injects to $M$ if and only if $IJ= I \cap J$. For $I=J$ this says $I^2=I$. But of course there are ideals with $I^2 \neq I$ (for example maximal ideals in a PID, or ideals with $I^2=0 \neq I$ as in Jim's example).