Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E1ABF200C81 for ; Fri, 26 May 2017 13:57:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E04AC160BC8; Fri, 26 May 2017 11:57:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2F220160BB8 for ; Fri, 26 May 2017 13:57:19 +0200 (CEST) Received: (qmail 78429 invoked by uid 500); 26 May 2017 11:57:18 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 78417 invoked by uid 99); 26 May 2017 11:57:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 May 2017 11:57:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 92E68CFDDC for ; Fri, 26 May 2017 11:57:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.632 X-Spam-Level: X-Spam-Status: No, score=0.632 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=objectstyle-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id LQxM6sLYoPrw for ; Fri, 26 May 2017 11:57:15 +0000 (UTC) Received: from mail-ua0-f177.google.com (mail-ua0-f177.google.com [209.85.217.177]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id E12585F2FD for ; Fri, 26 May 2017 11:57:14 +0000 (UTC) Received: by mail-ua0-f177.google.com with SMTP id y4so4684901uay.2 for ; Fri, 26 May 2017 04:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=objectstyle-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=fCvHCB2HWnIwuJihe1wuaIrMatTpYpv9JTjmARa+6tA=; b=kp06uaakPhdWETwjx6ne5IyinP7CQJuvRbtR856kJzJcdm1N5PyxZBMdOc8JKgnBNR 4qpgEw2mIJ6j+yu2fcSx2G033AmtjBHFCEt89QwpP2CaMyDELV9G+9DylkubL0xuyeSm LTjaTHDNqWf5BvEzOvBKFRdAziUTBWAAIF/TFPWqIykl9QL1PBzy2/1PWZ4HI2W9BhYD 11GB9ggRUJK92Ekpk/oYlo3PoJye8KumTAPtdmHYP2oCJWMEPSMcfgEjHmuqC1aI7wNx NK9oVrYFaS55xYZowjw+ijqdR87nS0Zz5ELiwiGOuLpE3ugQrX7EKiHfNc8+SCmGFvSB rMlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=fCvHCB2HWnIwuJihe1wuaIrMatTpYpv9JTjmARa+6tA=; b=oAiGYdDkljpvawK/+Z8OgS06i9JABCn/FUbWcD7OTZPbYnJn3WhjRaMlk1/7KjLNOu sxVcpfKYDdL/FwvZj6WZRN10HzvPT1A6IjCmZzDrMYIpxZ1B0vHe1NId8FsjrIiJQiEJ XFgzwOv3o+hvrwJBsizBPDI2Cvz8oF0TuKRURwa0gAD4M3OwOj1FnMbQM0xLJf43r5CY KOjLExoNGCOhgt3RaDfbg8V6+abYVsegO7tX+drhXJSGA5YVE4VHvSjcOG58RQClYDyX PFnaln7+SwA5EGehkcECmf5Ookgpg5y9rsrolOCQyYcImKBs2bmA9d4tfQDO4bDVEXI2 yukw== X-Gm-Message-State: AODbwcC9Varo2Z6Gp70LtdtVYA8OGUwC1xoANxL52sPaDf0Ndi3ji1tF Xe/vzC1q8BWOJCMi/7gE30MFzNeMfyx5RVQ= X-Received: by 10.159.48.144 with SMTP id j16mr851224uab.131.1495799828681; Fri, 26 May 2017 04:57:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.116.20 with HTTP; Fri, 26 May 2017 04:56:48 -0700 (PDT) In-Reply-To: <057FB366-D3A0-4130-A57F-4CAAF72553F8@karlmenn.is> References: <47FDF8E5-D7C6-4F2B-A4C0-0FC0D06C788C@objectstyle.org> <129F1083-E08E-46EB-B20A-6908EE76D3ED@objectstyle.org> <057FB366-D3A0-4130-A57F-4CAAF72553F8@karlmenn.is> From: Nikita Timofeev Date: Fri, 26 May 2017 14:56:48 +0300 Message-ID: Subject: Re: ColumnSelect and java.time (Java 8) To: user@cayenne.apache.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable archived-at: Fri, 26 May 2017 11:57:20 -0000 Hi again, I've pushed fix for this issue. https://github.com/apache/cayenne/commit/eac1f31073045fec6eafef3f3fd6cb05f0= 201994 On Wed, May 24, 2017 at 7:03 PM, Hugi Thordarson wrote: > Thanks Nikita, at least I know I'm not doing anything wrong then :) > > - hugi > > >> On 24 May 2017, at 14:52, Nikita Timofeev wr= ote: >> >> Hi Hugi, >> >> Seems like custom types are broken in ColumnSelect, I see this bug in >> my test too. >> >> On Wed, May 24, 2017 at 5:34 PM, Hugi Thordarson wrot= e: >>> I'm using today's version of 4.0.M6-SNAPSHOT. Always living on the edge= :) >>> >>> - hugi >>> >>> >>>> On 24 May 2017, at 14:31, Andrus Adamchik wro= te: >>>> >>>> Or .. if you already have cayenne-java8 in your app, and the problem i= s specific to just the column select query, you may also need to switch to = M6. IIRC there were some issues in M5 with the behavior that you describe. >>>> >>>> Andrus >>>> >>>>> On May 24, 2017, at 5:28 PM, Andrus Adamchik = wrote: >>>>> >>>>> You need to add cayenne-java8 dependency. >>>>> >>>>> Unfortunately the fallback behavior (treat unknown class as Serializa= ble) is extremely confusing. Though I think we log some warnings before doi= ng that. >>>>> >>>>> ANdrus >>>>> >>>>> >>>>>> On May 24, 2017, at 5:20 PM, Hugi Thordarson wrot= e: >>>>>> >>>>>> Hi all, >>>>>> if I try to fetch Java 8 date objects using ColumnSelect, the values= get returned as byte arrays instead of actual objects. Example: >>>>>> >>>>>> LocalDateTime creationDate =3D ObjectSelect >>>>>> .query( User.class ) >>>>>> .column( User.CREATION_DATE ) >>>>>> .selectFirst( Jambalaya.newContext() ); >>>>>> >>>>>> User.creationDate() is a LocalDateTime=E2=80=94but the fetch will fa= il since the returned value is a byte array. >>>>>> >>>>>> Bug? >>>>>> >>>>>> Cheers, >>>>>> - hugi > --=20 Best regards, Nikita Timofeev