--To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/f6489f01-e981-44a1-966e-aec93da36f18%40googlegroups.com.
---
You received this message because you are subscribed to the Google Groups "Slick / ScalaQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalaquery+...@googlegroups.com.
My question is, do you want the time it was created or updated in the database store, or at the time your code created or updated the object in memory?
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/f2b07017-d665-444f-ac81-8d82fbda8e17%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/ba20a464-01ca-4bb5-801f-b598c1fecf7f%40googlegroups.com.
--
---
You received this message because you are subscribed to the Google Groups "Slick / ScalaQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalaquery+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/ad56f27a-be3c-4ca1-9c0c-36efaa6153ca%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Slick / ScalaQuery" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scalaquery/EbPA2Iv8DT4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scalaquery+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/a7101f1b-576c-44b5-b468-78eb239f965d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/d27439b7-6b04-428e-9a4e-9e4312f8cf7b%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/8e406a05-0f4c-4a12-aec2-91429db6dc2b%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/abb8d849-b3c7-43c3-96dc-21e468c60c09%40googlegroups.com.
On Tuesday, 8 July 2014 at 23:25, virtualeyes wrote:
Yoel, nice.
Question, why don't you stick the following in a helper trait?
def created_on = column[Timestamp]("created_on", O.Nullable)def updated_on = column[Timestamp]("updated_on", O.Nullable)
Need to manually define these properties for the case class but for the table mapping the same requirement doesn't hold (i.e. additional mappings can go in a helper)
--
---
You received this message because you are subscribed to a topic in the Google Groups "Slick / ScalaQuery" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scalaquery/EbPA2Iv8DT4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scalaquery+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/360051f2-7572-4e9d-ae28-57c4f31710b7%40googlegroups.com.
Fixed this by moving the optional arguments to the end of the argument list.
When i try to insert a Contest, I get a weird type mismatch errorval contests = TableQuery[Contests]contests += Contest("new title", "damainboss")[error] found : Int[error] required: List[models.Contest][error] contests += Contest("new title", "damainboss")[error]Isn’t that the right way to insert data? The arrow was pointing at the “+=“. I’m not even sure where it got an Int from. :(
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/9E4C62EA688C46399B28BD571EAFEB32%40fayimora.com.
I did it like this:trait TimestampedTable { this: Table[_] =>def createdAt = column[Timestamp]("CREATED_AT", O.NotNull)def updatedAt = column[Timestamp]("UPDATED_AT", O.NotNull)}class Contests(tag: Tag) extends Table[Contest](tag, "CONTESTS") with TimestampedTable {// other attrs and projection here}Do you mind explaining this part?: this: Table[_] =>
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/bb0da187-1e57-4995-bdaa-5539e5284549%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Slick / ScalaQuery" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scalaquery/EbPA2Iv8DT4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scalaquery+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/CANpg8PCM23d3%3DTDnsYn0gg_UwJydZ0QnA5SNgU7TiZadiBeRKQ%40mail.gmail.com.