Something Funky is up with MongoRecord Method Overloading

19 views
Skip to first unread message

Matt Farmer

unread,
Oct 6, 2012, 10:59:20 AM10/6/12
to lif...@googlegroups.com
Hey folks,

So, I'm seeing something of a head scratcher this morning. Working on a small side project using Lift 2.5-M1, and I'm trying to use write concerns to ensure that something get written before I need it on the immediate next line. According to the docs, MongoRecord.save has three flavors
  1. MongoRecord.save
  2. MongoRecord.save(concern:WriteConcern)
  3. MongoRecord.save(safe:Boolean)
However, for whatever reason, the compiler only appears to see the first version of the save method. I see this error when I attempt to use the third variation I listed above:

[error] /Users/matt/Sites/anchor_tab/src/main/scala/com/anchortab/snippet/Authentication.scala:147: Unit does not take parameters
[error]               val result : User = user.save(true)
[error]                                            ^
[error] one error found

Has anyone seen this before? If need be I can work up a super simple sample project, but it looks like something with the overloading is borked, but I can't reproduce it in the Console with a simplified version of the inheritance and I can't reproduce this. Has anyone else seen this happening as of late?

David Pollak

unread,
Oct 7, 2012, 11:54:55 AM10/7/12
to lif...@googlegroups.com
Very weird. Are you using 2.9.2? If so, can you trying with Scala 2.9.1 and see if it makes a difference?

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
 
 



--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net


AGYNAMIX Torsten Uhlmann

unread,
Oct 7, 2012, 12:09:55 PM10/7/12
to lif...@googlegroups.com
Hi Matt,

I'm using MongoRecord with Scala 2.9.2 and Lift 2.5-SNAPSHOT and save(true) and don't see any problems.
Did you already try a clean and clean-files.

I used 2.5-SNAPSHOT before M1 was released with the save(true) call and it continues to work after an update of the dependencies.

Weird problem, indeed.

Hope you don't spend too much time on it!

Torsten.

-- 
AGYNAMIX(R). Passionate Software.
Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim
Phone:       +49 3721 273445
Fax:             +49 3721 273446
Mobile:       +49 151 12412427
Web:           http://www.agynamix.de

Matt Farmer

unread,
Oct 18, 2012, 2:48:21 AM10/18/12
to lif...@googlegroups.com
Erhm. Fun fact. I'm no longer getting email notifications for Lift list threads that I started. -.-

2.9.1 seems to be exhibiting similar oddities along these lines. I'm seeing a different error now (I ran across this again tonight before remembering that I had put this question out to the list), but it seems to be likewise caused by trying to specify the write concern. Not exactly sure how I managed to so throughly screw things up. heh.
Reply all
Reply to author
Forward
0 new messages