Message from discussion
[2.0] New Plugin MongoDB / Salat
Received: by 10.52.32.66 with SMTP id g2mr1671604vdi.5.1334330314243;
Fri, 13 Apr 2012 08:18:34 -0700 (PDT)
X-BeenThere: play-framework@googlegroups.com
Received: by 10.220.66.3 with SMTP id l3ls1563255vci.9.gmail; Fri, 13 Apr 2012
08:18:28 -0700 (PDT)
Received: by 10.52.36.136 with SMTP id q8mr162925vdj.17.1334330308023;
Fri, 13 Apr 2012 08:18:28 -0700 (PDT)
Date: Fri, 13 Apr 2012 08:18:27 -0700 (PDT)
From: Leon Radley <l...@radley.se>
To: play-framework@googlegroups.com
Message-ID: <2180841.165.1334330307536.JavaMail.geo-discussion-forums@ynjc2>
In-Reply-To: <CAAOkgHMH5smDoHVXi2VmxtMyKXQrE==B8rLV2=8adT64ifBsrw@mail.gmail.com>
References: <18710695.315.1334064563473.JavaMail.geo-discussion-forums@vbpp14>
<2018569.2946.1334065471326.JavaMail.geo-discussion-forums@vbdn7>
<11921462.461.1334078845835.JavaMail.geo-discussion-forums@vbxy18>
<CAGeLGgusTWoHbW8ZzUPDL3GYaDJep=+cgc_70mDL2Qq2_B-ynw@mail.gmail.com>
<CAGeLGguD5OPL6DSVZTyEOg2Shp5aw14O_9aLtM-sp-1de5_T9A@mail.gmail.com>
<CAAOkgHOWcK=Pe9AHe5ZwAy2a++7v0cP3T2d4ZLdUh=8PO4-2Lw@mail.gmail.com> <28971023.1121.1334305333227.JavaMail.geo-discussion-forums@vbmq16>
<CAAOkgHMH5smDoHVXi2VmxtMyKXQrE==B8rLV2=8adT64ifBsrw@mail.gmail.com>
Subject: Re: [play-framework] Re: [2.0] New Plugin MongoDB / Salat
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_163_15847798.1334330307534"
------=_Part_163_15847798.1334330307534
Content-Type: multipart/alternative;
boundary="----=_Part_164_32424567.1334330307534"
------=_Part_164_32424567.1334330307534
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
I replied on stack overfow. but I'll say the same here for future reference.
scala doesn't seem to like extend the companion object of the entities, so
we need to have them in a separate object.
I've been working on a project all day with the plugin, and seems to be
holding up good.
The plugin is now available from the main repo which means we don't have to
add to the resolvers which is nice, and i've also added some other nice
stuff.
Check out the updated tutorial!
:)
On Friday, April 13, 2012 4:22:15 PM UTC+2, Wes Freeman wrote:
>
> I agree, play-salat makes more sense. It leaves room for other mongodb
> plugins which use other mappers.
>
> I did run into an issue yesterday while trying to pass lists to views:
>
> http://stackoverflow.com/questions/10132730/play-framework-2-0-scala-classcastexception-models-mymodel-cannot-be-cast-to
>
> Was I doing something else wrong, or do you really need to have different
> names for the object and the case class?
>
> Wes
>
> On Fri, Apr 13, 2012 at 4:22 AM, Leon Radley <> wrote:
>
>> I've decided to rename this plugin to salat and simplify it a bit. At
>> first I thought I'd make a general scala mongodb plugin and have salat live
>> beside it.
>>
>> Most of the plugin is about handling multiple sources and configuration.
>>
>> But it only meant you hade to add more imports and the "YAGNI"(you ain't
>> gonna need it) was a fact. I arrived at the conclusion that:
>> From now on this plugin is going to be the Salat plugin.
>>
>> I've also added query string and path binders for ObjectId, add the
>> implicit conversions to you Build.scala settings.
>>
>> val main = PlayProject(appName, appVersion, appDependencies, mainLang =
>> SCALA).settings(
>> resolvers += "OSS Repo" at "
>> https://oss.sonatype.org/content/repositories/snapshots",
>> routesImport ++= Seq("se.radley.plugin.salat.Binders._")
>> )
>>
>>
>> The new home is http://github.com/leon/play-salat
>>
>> On Thursday, April 12, 2012 5:01:05 PM UTC+2, Wes Freeman wrote:
>>>
>>> Thanks for putting this plugin together, Leon. It's working great for me
>>> so far, on my first play 2 prototype app. Great timing...
>>>
>>> Wes
>>>
>>
>
------=_Part_164_32424567.1334330307534
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
I replied on stack overfow. but I'll say the same here for future reference=
.<div><br></div><div>scala doesn't seem to like extend the companion object=
of the entities, so we need to have them in a separate object.</div><div>I=
've been working on a project all day with the plugin, and seems to be hold=
ing up good.<br></div><div>The plugin is now available from the main repo w=
hich means we don't have to add to the resolvers which is nice, and i've al=
so added some other nice stuff.<br></div><div><br></div><div>Check out the =
updated tutorial!</div><div><br></div><div>:)<br><br>On Friday, April 13, 2=
012 4:22:15 PM UTC+2, Wes Freeman wrote:<blockquote class=3D"gmail_quote" s=
tyle=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-le=
ft: 1ex;">I agree, play-salat makes more sense. It leaves room for other mo=
ngodb plugins which use other mappers. <div><br></div><div>I did run =
into an issue yesterday while trying to pass lists to views:<br><a href=3D"=
http://stackoverflow.com/questions/10132730/play-framework-2-0-scala-classc=
astexception-models-mymodel-cannot-be-cast-to" target=3D"_blank">http://sta=
ckoverflow.com/<wbr>questions/10132730/play-<wbr>framework-2-0-scala-<wbr>c=
lasscastexception-models-<wbr>mymodel-cannot-be-cast-to</a></div>
<div><br></div><div>Was I doing something else wrong, or do you really need=
to have different names for the object and the case class?</div><div><br><=
/div><div>Wes</div><div><br><div class=3D"gmail_quote">On Fri, Apr 13, 2012=
at 4:22 AM, Leon Radley <span dir=3D"ltr"><></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">I've decided to rename this plugin=
to salat and simplify it a bit. At first I thought I'd make a general scal=
a mongodb plugin and have salat live beside it.<div>
<br></div><div>Most of the plugin is about handling multiple sources and co=
nfiguration.</div><div><br></div><div>But it only meant you hade to add mor=
e imports and the "YAGNI"(you ain't gonna need it) was a fact. I arrived at=
the conclusion that:<div>
From now on this plugin is going to be the Salat plugin.<br></div><div><br>=
</div><div>I've also added query string and path binders for ObjectId, add =
the implicit conversions to you Build.scala settings.</div><div><br>
</div><div><div>val main =3D PlayProject(appName, appVersion, appDependenci=
es, mainLang =3D SCALA).settings(</div><div> resolvers +=3D "OSS Repo=
" at "<a href=3D"https://oss.sonatype.org/content/repositories/snapshots" t=
arget=3D"_blank">https://oss.sonatype.org/<wbr>content/repositories/snapsho=
ts</a><wbr>",</div>
<div> routesImport ++=3D Seq("se.radley.plugin.salat.<wbr>Binders._")=
</div><div>)</div></div><div><br></div><div><br></div><div>The new home is&=
nbsp;<a href=3D"http://github.com/leon/play-salat" target=3D"_blank">http:/=
/github.com/leon/<wbr>play-salat</a></div>
<div>
<div><br>On Thursday, April 12, 2012 5:01:05 PM UTC+2, Wes Freeman wrote:<b=
lockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-=
left:1px #ccc solid;padding-left:1ex"><div><font face=3D"arial, helvetica, =
sans-serif">Thanks for putting this plugin together, Leon. It's working gre=
at for me so far, on my first play 2 prototype app. Great timing...</font><=
/div>
<div><font face=3D"arial, helvetica, sans-serif"><br>
Wes</font></div></blockquote></div></div></div></blockquote></div><br></div=
>
</blockquote></div>
------=_Part_164_32424567.1334330307534--
------=_Part_163_15847798.1334330307534--