google-code-export / morphia

Automatically exported from code.google.com/p/morphia
1 stars 0 forks source link

Ambiguous interface #243

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
with some compiler (javac, but not eclipse), things get ambiguous, when calling 

<T> UpdateResults<T> update(Query<T> query, UpdateOperations<T> ops);

vs. 

<T> UpdateResults<T> update(T ent, UpdateOperations<T> ops);

because T is not bound at all. As we do not want an interface for enities, i 
guess going to updateQuery(..) and updateEntity(..) would be the safest way?

Original issue reported on code.google.com by google-a...@codesmell.de on 10 Mar 2011 at 9:56

GoogleCodeExporter commented 9 years ago
If this is a runtime problem then we can fix it; if it is compile time issue 
then we might need to use a different name as you suggest.

Original comment by scotthernandez on 3 Apr 2011 at 4:58

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1738.

Original comment by scotthernandez on 3 Apr 2011 at 4:59

GoogleCodeExporter commented 9 years ago

Original comment by scotthernandez on 12 Nov 2011 at 7:39

GoogleCodeExporter commented 9 years ago
I don't believe the fix in r1738 was successful, as it doesn't remove the 
compile-time ambiguity. With the current HEAD I still see the following 
compile-time warnings:

reference to update is ambiguous, both method 
<T>update(T,com.google.code.morphia.query.UpdateOperations<T>) in 
com.google.code.morphia.Datastore and method 
<T>update(com.google.code.morphia.query.Query<T>,com.google.code.morphia.query.U
pdateOperations<T>) in com.google.code.morphia.Datastore match

Original comment by wagner.d...@gmail.com on 24 Jun 2012 at 8:52