Re: [hibernate-dev] Should the LocalTimeType use the globally configured TimeZone?

2018-10-05 Thread Gunnar Morling
IMO no timezone conversion whatsoever should be applied when persisting LocalDateTime as it doesn't contain any TZ information. If the target column type requires a TZ, it should be set to UTC, storing the given value without any shift. I.e. the LDT value 2007-12-03T10:15:30 should be stored as 20

Re: [hibernate-dev] Should the LocalTimeType use the globally configured TimeZone?

2018-10-05 Thread Yoann Rodiere
> In fact I'd even recommend to use a string-based column type to store > LDT, as it avoids these kinds of issues altogether. Or just, you know, "timestamp without timezone". Where possible. More to the point, I agree with Vlad's proposition, and I also think ORM should avoid messing with timezo

Re: [hibernate-dev] Should the LocalTimeType use the globally configured TimeZone?

2018-10-05 Thread Vlad Mihalcea
Hi IMO no timezone conversion whatsoever should be applied when > persisting LocalDateTime as it doesn't contain any TZ information. That's not very easy to do since either the JDBC Driver or the database engine might to the timezone conversion based on the underlying setting. In fact I'd even

[hibernate-dev] StatelessSession and JTA platform without transaction manager

2018-10-05 Thread Guillaume Smet
Hi, I'm triaging the latest issues and I stumbled upon this one: https://hibernate.atlassian.net/browse/HHH-13002 . This particular issue happens because our OSGi stuff enforce an OsgiJtaPlatform even if there is no JTA transaction manager. I'm not very familiar with JTA in ORM but I find suspic

Re: [hibernate-dev] Should the LocalTimeType use the globally configured TimeZone?

2018-10-05 Thread Sanne Grinovero
On Fri, 5 Oct 2018 at 10:28, Vlad Mihalcea wrote: > > Hi > > IMO no timezone conversion whatsoever should be applied when > > persisting LocalDateTime as it doesn't contain any TZ information. > > > That's not very easy to do since either the JDBC Driver or the database > engine might to the timez

Re: [hibernate-dev] What should happen to queued operations when a collection is detached?

2018-10-05 Thread andrea boriero
I would say to log a warning when the entity is detached and then clear the queued operations. On Fri, 5 Oct 2018 at 07:25, Gail Badner wrote: > Guillaume has reviewed my PR and I've pushed the fix to master. > > I still think the inconsistency should be resolved. I have no plans to do > any mo

Re: [hibernate-dev] Should the LocalTimeType use the globally configured TimeZone?

2018-10-05 Thread Steve Ebersole
Ah good, its time for this yearly discussion :D The problem is as Vlad points out. We are kind of forced to do *something* wrt timezone to often times counteract what the JDBC driver will do. As I have always contended, imo that saving a date into the database with any kind of timzone (other tha

Re: [hibernate-dev] Should the LocalTimeType use the globally configured TimeZone?

2018-10-05 Thread Sanne Grinovero
On Fri, 5 Oct 2018 at 12:47, Steve Ebersole wrote: > > Ah good, its time for this yearly discussion :D Lol :) but don't we have better options now with the new Date/Time API? The old "Date" certainly was ambiguous in this regard, as one had a single business type which could be occasionally use

Re: [hibernate-dev] Should the LocalTimeType use the globally configured TimeZone?

2018-10-05 Thread Vlad Mihalcea
Hi, My question was more about LocalTime, which is much more straightforward to address than LocalDateTime in the context of time zones. For DateTime types which support timezones, I'll have to study to see what other non-breaking alternatives we may have. Vlad On Fri, Oct 5, 2018 at 2:28 PM St

Re: [hibernate-dev] Should the LocalTimeType use the globally configured TimeZone?

2018-10-05 Thread Sanne Grinovero
On Fri, 5 Oct 2018 at 14:40, Vlad Mihalcea wrote: > > Hi, > > My question was more about LocalTime, which is much more straightforward to > address than LocalDateTime in the context of time zones. Ok so specifically discussing LocalTime. If you *really must* store a LocalTime as an absolute tim

Re: [hibernate-dev] Should the LocalTimeType use the globally configured TimeZone?

2018-10-05 Thread Mark Rotteveel
On 5-10-2018 15:40, Vlad Mihalcea wrote: > Hi, > > My question was more about LocalTime, which is much more straightforward to > address than LocalDateTime in the context of time zones. > > For DateTime types which support timezones, I'll have to study to see what > other non-breaking alternative

[hibernate-dev] Legacy Jenkins API tokens

2018-10-05 Thread Yoann Rodiere
Hello, FYI, I just revoked all the legacy Jenkins API tokens, as recommended. Don't worry, I'm talking about tokens issued by Jenkins to each user and allowing to use Jenkins APIs; this is completely unrelated to GitHub/AWS credentials and such. More information: https://jenkins.io/blog/2018/07/0

Re: [hibernate-dev] *-to-one associations and @NotFound

2018-10-05 Thread Gail Badner
After discussions with Stephen Fikes and Guillaume, I've added resolutions to the document. In a nutshell, here is what we decided. 1) Ccombination of @NotFound(IGNORE) and non-optional one-to-one/many-to-one will throw MappingException. 2) Combination of @NotFound(IGNORE) and "mappedBy" one-to-

Re: [hibernate-dev] What should happen to queued operations when a collection is detached?

2018-10-05 Thread Gail Badner
Before doing this, I'd like to get some feedback about these warnings cropping up, just in case there is a valid use case that we're missing. On Fri, Oct 5, 2018 at 2:46 AM andrea boriero wrote: > I would say to log a warning when the entity is detached and then clear > the queued operations. >

Re: [hibernate-dev] *-to-one associations and @NotFound

2018-10-05 Thread Gail Badner
I thought of another case that hasn't been discussed fully. It's covered in the section, Possible Anomalies - @NotFound(EXCEPTION) has no effect in some cases - Non-Optional Associations. Guillaume and Stephen, please take a look and let me know your thoughts. Thanks, Gail On Fri, Oct 5, 2018 at