Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Vadim Lopatin
On Thursday, 4 April 2013 at 09:54:48 UTC, Dicebot wrote: On Wednesday, 3 April 2013 at 19:07:39 UTC, Vadim Lopatin wrote: I don't see what to simplify in markup like this: ... You may implement approach similar to one used in vibe.d http.rest and http.form modules. Some specific examples

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Dicebot
On Friday, 5 April 2013 at 07:32:55 UTC, Vadim Lopatin wrote: Looks ugly, but I tried `typedef string String`, but it is deprecated; `alias string String` cannot be distinguished from just string. How to define String better? Is there a good way to define String to be compatible with string,

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Jacob Carlborg
On 2013-04-05 09:32, Vadim Lopatin wrote: Implemented changes for better convention-over-configuration: - If no annotations on class level, @Entity is assumed. - No required annotation for simple properties. Nullability is deduced from data type - @Embedded annotation is not needed anymore -

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Vadim Lopatin
On Friday, 5 April 2013 at 08:53:56 UTC, Jacob Carlborg wrote: Why won't Nullable!(string) String work? It's to reduce field size (eliminate unnecessary bool field from Nullable!, but it's easy to support both cases. Looks much better know. I'm wondering though, if there need to be a way

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Vadim Lopatin
On Friday, 5 April 2013 at 07:57:37 UTC, Dicebot wrote: On Friday, 5 April 2013 at 07:32:55 UTC, Vadim Lopatin wrote: Looks ugly, but I tried `typedef string String`, but it is deprecated; `alias string String` cannot be distinguished from just string. How to define String better? Is there a

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Dicebot
On Friday, 5 April 2013 at 09:26:30 UTC, Vadim Lopatin wrote: On Friday, 5 April 2013 at 07:57:37 UTC, Dicebot wrote: On Friday, 5 April 2013 at 07:32:55 UTC, Vadim Lopatin wrote: Looks ugly, but I tried `typedef string String`, but it is deprecated; `alias string String` cannot be

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Vadim Lopatin
On Friday, 5 April 2013 at 09:22:17 UTC, Vadim Lopatin wrote: On Friday, 5 April 2013 at 08:53:56 UTC, Jacob Carlborg wrote: Why won't Nullable!(string) String work? It's to reduce field size (eliminate unnecessary bool field from Nullable!, but it's easy to support both cases. Looks much

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Vadim Lopatin
On Friday, 5 April 2013 at 09:36:04 UTC, Dicebot wrote: On Friday, 5 April 2013 at 09:26:30 UTC, Vadim Lopatin wrote: On Friday, 5 April 2013 at 07:57:37 UTC, Dicebot wrote: On Friday, 5 April 2013 at 07:32:55 UTC, Vadim Lopatin wrote: Looks ugly, but I tried `typedef string String`, but it is

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Jacob Carlborg
On 2013-04-05 11:44, Vadim Lopatin wrote: Submitted fix to support @Transient. It can be used on class level as well. Currently, if module is passed to metadata extractor, only classes which have at least one HibernateD annotation are being imported. Alternative is to import all classes,

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Vadim Lopatin
On Friday, 5 April 2013 at 12:13:42 UTC, Jacob Carlborg wrote: Looks much better know. I'm wondering though, if there need to be a way to indicate a regular instance variable that isn't a column. 1) Any private, protected, package members are not columns. Right, didn't think of that. What

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Jacob Carlborg
On 2013-04-05 16:03, Vadim Lopatin wrote: 2) Read/write property @property T someProperty() { ... } @property xxx someProperty(T value) { ... } treated as property with name 'someProperty' BTW, I don't know how to check if property is read/write in compile time. If there's no

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Dicebot
On Friday, 5 April 2013 at 15:20:06 UTC, Jacob Carlborg wrote: On 2013-04-05 16:03, Vadim Lopatin wrote: 2) Read/write property @property T someProperty() { ... } @property xxx someProperty(T value) { ... } treated as property with name 'someProperty' BTW, I don't know how to check

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Vadim Lopatin
On Friday, 5 April 2013 at 15:52:43 UTC, Dicebot wrote: On Friday, 5 April 2013 at 15:20:06 UTC, Jacob Carlborg wrote: On 2013-04-05 16:03, Vadim Lopatin wrote: 2) Read/write property @property T someProperty() { ... } @property xxx someProperty(T value) { ... } treated as property with

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Dicebot
On Friday, 5 April 2013 at 16:41:53 UTC, Vadim Lopatin wrote: I'm iterating through class members using __traits(allMembers, T), then accessing member using _traits(getMember,T,memberName) I'm not sure which one of the members with the same name will be returned by getMember... Property

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Vadim Lopatin
On Friday, 5 April 2013 at 17:18:01 UTC, Dicebot wrote: On Friday, 5 April 2013 at 16:41:53 UTC, Vadim Lopatin wrote: I'm iterating through class members using __traits(allMembers, T), then accessing member using _traits(getMember,T,memberName) I'm not sure which one of the members with the

Re: HibernateD and DDBC - ORM and DB abstraction layer for D

2013-04-05 Thread Nick Sabalausky
On Wed, 03 Apr 2013 20:01:54 +0200 Vadim Lopatin coolreader@gmail.com wrote: Besides connection replacement, I've added some getters to retrieve resultset and parameters metadata from mysqln, to support NULL blobs, and some more fixes. I fixed the NULL blob thing in the main