google-code-export / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
1 stars 0 forks source link

Ambiguous overloads for Objectify.put() when called from Scala #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using Objectify in my Scala project.  The Objectify interface has these two 
overloads for put():

   put(T)
   put(T...)

In Java, if you call put(thing), it picks the second overload.  In Scala, 
calling put(thing) is ambiguous.  My current workaround is to do 
put(List(thing)), which always calls the second overload.

If there were two additional overloads, things would be a little more 
convenient for us Scala users.

   putOne(T)
   putMany(T...)

Original issue reported on code.google.com by kannan%c...@gtempaccount.com on 6 Apr 2011 at 2:40

GoogleCodeExporter commented 9 years ago
Oops, my workaround was incorrect.  put(List(thing)) doesn't work here either.  
Correct workaround: put[User](thing).

Original comment by kannan%c...@gtempaccount.com on 6 Apr 2011 at 2:59

GoogleCodeExporter commented 9 years ago

Original comment by lhori...@gmail.com on 9 Apr 2011 at 1:52

GoogleCodeExporter commented 9 years ago
I'd like to use objectify with Sacala too - would it be possible to have an 
unambiguous put method?

Original comment by maran...@gmail.com on 22 Nov 2011 at 2:57

GoogleCodeExporter commented 9 years ago
This will be addressed in Objectify4 (in progress)

Original comment by lhori...@gmail.com on 22 Nov 2011 at 3:23

GoogleCodeExporter commented 9 years ago
Fixed by Objectify4

Original comment by lhori...@gmail.com on 16 Dec 2011 at 2:27

GoogleCodeExporter commented 9 years ago
I see the note that it's fixed in Objectify4, but what's the fix? Did you 
implement the overloads?

Original comment by Smokejum...@gmail.com on 14 Jan 2012 at 6:15

GoogleCodeExporter commented 9 years ago
Looks like the objectify.cmd.Saver interface has an 'entity' function for one 
object and an 'entities' function for multiple.

Original comment by kan...@cakoose.com on 14 Jan 2012 at 8:06