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

2013-06-25 Thread Kagamin
On Wednesday, 22 May 2013 at 00:19:04 UTC, Nick Sabalausky wrote: Right, exactly. In other words, there *is* a difference between null and empty string in D (even though it's sometimes a clouded issue since '==' counts them as equal). I meant there's no difference between them in meaningful

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

2013-06-25 Thread deadalnix
On Wednesday, 22 May 2013 at 00:19:04 UTC, Nick Sabalausky wrote: Right, exactly. In other words, there *is* a difference between null and empty string in D (even though it's sometimes a clouded issue since '==' counts them as equal). == compare value, is compare identity. Everything is fine

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

2013-06-19 Thread Vadim Lopatin
New version: v0.2.9 Fixed HQL parser bug with underscores in field and table names Fixed compilation error with undefined identifiers in metadata.d Merged pull request to use standard mysql-native library

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

2013-05-22 Thread Nick Sabalausky
On Mon, 06 May 2013 11:14:56 +0200 Kagamin s...@here.lot wrote: On Monday, 29 April 2013 at 09:38:10 UTC, David wrote: Null blows up your code, doesn't. There's no difference between null and empty string in D. That's not true: assert( !is null); // Passes Or did I misunderstand

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

2013-05-22 Thread Diggory
On Tuesday, 21 May 2013 at 22:24:06 UTC, Nick Sabalausky wrote: On Mon, 06 May 2013 11:14:56 +0200 Kagamin s...@here.lot wrote: On Monday, 29 April 2013 at 09:38:10 UTC, David wrote: Null blows up your code, doesn't. There's no difference between null and empty string in D. That's not

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

2013-05-22 Thread Nick Sabalausky
On Wed, 22 May 2013 02:10:52 +0200 Diggory digg...@googlemail.com wrote: On Tuesday, 21 May 2013 at 22:24:06 UTC, Nick Sabalausky wrote: On Mon, 06 May 2013 11:14:56 +0200 Kagamin s...@here.lot wrote: On Monday, 29 April 2013 at 09:38:10 UTC, David wrote: Null blows up your code,

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

2013-05-07 Thread Vadim Lopatin
On Monday, 6 May 2013 at 09:14:57 UTC, Kagamin wrote: On Monday, 29 April 2013 at 09:38:10 UTC, David wrote: Null blows up your code, doesn't. There's no difference between null and empty string in D. Also it's a SQL thing, NotNull must be initialized, when the row is filled. Full SQL

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

2013-05-06 Thread Kagamin
On Monday, 29 April 2013 at 09:38:10 UTC, David wrote: Null blows up your code, doesn't. There's no difference between null and empty string in D. Also it's a SQL thing, NotNull must be initialized, when the row is filled. Full SQL support is good to have. I question the decision to make

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

2013-04-29 Thread David
Am 29.04.2013 11:25, schrieb Kagamin: On Friday, 5 April 2013 at 07:32:55 UTC, Vadim Lopatin wrote: @Embeddable // required for Embeddable class Address { String zip; // @Null String state; // @Null string streetAddress; // @NotNull } Is it good to assume

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

2013-04-18 Thread Vadim Lopatin
On Wednesday, 17 April 2013 at 13:46:30 UTC, kdmult wrote: P.S: I've registered ddbc and hibernated in DUB repository. I have tried to generate a visuald project which depends on both. There is a couple of issues. 1. Since you use prefix hibernated (for example, hibernated.core) there

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

2013-04-17 Thread Vadim Lopatin
On Tuesday, 16 April 2013 at 07:41:04 UTC, Sönke Ludwig wrote: Sorry, the library target types are still not fully implemented. But if the package is used as a dependency instead of being directly built, it will be properly used as a library instead of as an executable. Hello, I've sent

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

2013-04-17 Thread kdmult
P.S: I've registered ddbc and hibernated in DUB repository. I have tried to generate a visuald project which depends on both. There is a couple of issues. 1. Since you use prefix hibernated (for example, hibernated.core) there should be subfolder hibernated under source. And the source code

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

2013-04-16 Thread Vadim Lopatin
On Saturday, 13 April 2013 at 16:23:04 UTC, michaelc37 wrote: First off; Awesome project (just discovered this). Is it possible set up the mapping externally in some sort of xml configuration file (without using attributes)right now? If not, is it planned for future? The reason i ask is

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

2013-04-16 Thread Sönke Ludwig
Sorry, the library target types are still not fully implemented. But if the package is used as a dependency instead of being directly built, it will be properly used as a library instead of as an executable. I would go with the following minimal package description for now (the source folder and

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

2013-04-13 Thread michaelc37
First off; Awesome project (just discovered this). Is it possible set up the mapping externally in some sort of xml configuration file (without using attributes)right now? If not, is it planned for future? The reason i ask is because i started playing around with nhibernate recently, and

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

2013-04-12 Thread Vadim Lopatin
On Wednesday, 3 April 2013 at 14:28:37 UTC, Vadim Lopatin wrote: Hello! I've started implemetation of ORM in D, with annotations and interfaces similar to Hibernate. As DB abstraction layer I wrote DDBC - library with interface similar to JDBC. Only MySQL driver is implemented. PostgreSQL -

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

2013-04-12 Thread Rory McGuire
:) nuodb. On Fri, Apr 12, 2013 at 9:08 AM, Vadim Lopatin coolreader@gmail.comwrote: On Wednesday, 3 April 2013 at 14:28:37 UTC, Vadim Lopatin wrote: Hello! I've started implemetation of ORM in D, with annotations and interfaces similar to Hibernate. As DB abstraction layer I wrote

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

2013-04-12 Thread kdmult
Hi Vadim, Does anyone have an idea what to do next? It would be great if you publish the DUB package. Please refer to http://registry.vibed.org/publish. There is a hint. Page http://registry.vibed.org/ lists registered DUB packages. To see them you have to register and sign in there.

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

2013-04-12 Thread kdmult
There is a hint. Page http://registry.vibed.org/ lists registered DUB packages. To see them you have to register and sign in there. Otherwise, you will see some product info page. Oops. It looks fixed. :-)

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

2013-04-12 Thread Vadim Lopatin
On Friday, 12 April 2013 at 09:03:56 UTC, kdmult wrote: Hi Vadim, Does anyone have an idea what to do next? It would be great if you publish the DUB package. Please refer to http://registry.vibed.org/publish. There is a hint. Page http://registry.vibed.org/ lists registered DUB packages.

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

2013-04-12 Thread Vadim Lopatin
Still cannot build library using DUB. Tried different changes in package.json dub -v ... [7F6FC283306F: INF] Running dmd (compile)... [7F6FC283306F: dbg] dmd -w -g -debug -c -oftemp.o -version=USE_MYSQL -I/home/lve/src/ddbc/source source/drivers/sha1.d

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

2013-04-12 Thread David
Am 12.04.2013 15:17, schrieb Vadim Lopatin: Still cannot build library using DUB. Tried different changes in package.json dub -v ... [7F6FC283306F: INF] Running dmd (compile)... [7F6FC283306F: dbg] dmd -w -g -debug -c -oftemp.o -version=USE_MYSQL

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

2013-04-12 Thread Vadim Lopatin
On Friday, 12 April 2013 at 13:22:41 UTC, David wrote: [7F6FC283306F: INF] Linking... [7F6FC283306F: dbg] dmd -of/tmp/dub/2946988246/libddbc.a temp.o Why does it try to link app executable instead of just link library? Try to move targetType one level higher? Tried.

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

2013-04-10 Thread David
Am 09.04.2013 08:27, schrieb Suliman: At the same time, it's good to have some competition and alternative choices. It's not problem to have 2 realization. Base and alternative. To have one base realization is always good for thous who need to be sure that it would not be abandoned. I am

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

2013-04-10 Thread Vadim Lopatin
On Wednesday, 10 April 2013 at 08:59:07 UTC, David wrote: Am 09.04.2013 08:27, schrieb Suliman: At the same time, it's good to have some competition and alternative choices. It's not problem to have 2 realization. Base and alternative. To have one base realization is always good for thous

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

2013-04-10 Thread David
Am 10.04.2013 12:26, schrieb Vadim Lopatin: On Wednesday, 10 April 2013 at 08:59:07 UTC, David wrote: Am 09.04.2013 08:27, schrieb Suliman: At the same time, it's good to have some competition and alternative choices. It's not problem to have 2 realization. Base and alternative. To have one

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

2013-04-10 Thread Vadim Lopatin
On Wednesday, 10 April 2013 at 10:35:44 UTC, David wrote: Am 10.04.2013 12:26, schrieb Vadim Lopatin: On Wednesday, 10 April 2013 at 08:59:07 UTC, David wrote: Am 09.04.2013 08:27, schrieb Suliman: At the same time, it's good to have some competition and alternative choices. It's not

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

2013-04-10 Thread Vadim Lopatin
On Wednesday, 10 April 2013 at 11:04:27 UTC, Vadim Lopatin wrote: On Wednesday, 10 April 2013 at 10:35:44 UTC, David wrote: Am 10.04.2013 12:26, schrieb Vadim Lopatin: On Wednesday, 10 April 2013 at 08:59:07 UTC, David wrote: Am 09.04.2013 08:27, schrieb Suliman: At the same time, it's good

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

2013-04-10 Thread David
Am 10.04.2013 13:06, schrieb Vadim Lopatin: On Wednesday, 10 April 2013 at 11:04:27 UTC, Vadim Lopatin wrote: On Wednesday, 10 April 2013 at 10:35:44 UTC, David wrote: Am 10.04.2013 12:26, schrieb Vadim Lopatin: On Wednesday, 10 April 2013 at 08:59:07 UTC, David wrote: Am 09.04.2013 08:27,

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

2013-04-10 Thread Vadim Lopatin
On Wednesday, 3 April 2013 at 14:28:37 UTC, Vadim Lopatin wrote: Hello! I've started implemetation of ORM in D, with annotations and interfaces similar to Hibernate. As DB abstraction layer I wrote DDBC - library with interface similar to JDBC. Only MySQL driver is implemented. PostgreSQL -

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

2013-04-09 Thread Suliman
At the same time, it's good to have some competition and alternative choices. It's not problem to have 2 realization. Base and alternative. To have one base realization is always good for thous who need to be sure that it would not be abandoned.

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

2013-04-09 Thread Vadim Lopatin
On Wednesday, 3 April 2013 at 14:28:37 UTC, Vadim Lopatin wrote: Hello! I've started implemetation of ORM in D, with annotations and interfaces similar to Hibernate. As DB abstraction layer I wrote DDBC - library with interface similar to JDBC. Only MySQL driver is implemented. PostgreSQL -

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

2013-04-08 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-08 Thread BLM768
On Saturday, 6 April 2013 at 12:50:19 UTC, Suliman wrote: Because people want standards. For example people want GUI for D, but most of the people agree that it would bad idea to create 10 different GUIs, and it's better have one official GUI. Look at .NET it's include most of things that

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

2013-04-06 Thread Suliman
Should ORM be done as separate lib, or it's should become part of Phobos?

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

2013-04-06 Thread David
Am 06.04.2013 14:35, schrieb Suliman: Should ORM be done as separate lib, or it's should become part of Phobos? Why do people want to pack everything into phobos... And better question why is it then also added to phobos (like curl, wtf)? But that's a different topic.

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

2013-04-06 Thread Suliman
Because people want standards. For example people want GUI for D, but most of the people agree that it would bad idea to create 10 different GUIs, and it's better have one official GUI. Look at .NET it's include most of things that developers need at real life. And it's one of reasons of it's

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

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

2013-04-04 Thread Jacob Carlborg
On 2013-04-03 21:07, Vadim Lopatin wrote: I don't see what to simplify in markup like this: @Entity class User { @Generated long id; @Column string name; @ManyToOne Customer customer; @ManyToMany

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

2013-04-04 Thread Dicebot
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 are described by Jacob, but, in general, in results in 3

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

2013-04-04 Thread Vadim Lopatin
On Thursday, 4 April 2013 at 09:01:16 UTC, Jacob Carlborg wrote: Is the attributes necessary at all? I would just go with: class User { long id; // always assume auto increment, primary key, not null and so on string name; Customer customer; // infer @ManyToOne @ManyToMany

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

2013-04-03 Thread Vadim Lopatin
On Wednesday, 3 April 2013 at 17:22:46 UTC, Nick Sabalausky wrote: Actually I'm using mysqln as backend. But I patched it, removing vibe dependancies. (Vibe connection replaced with standard one). Ahh, ok. In that case, I may diff the two and see about making vibe.d connections vs std

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

2013-04-03 Thread Jacob Carlborg
On 2013-04-03 16:28, Vadim Lopatin wrote: Hello! I've started implemetation of ORM in D, with annotations and interfaces similar to Hibernate. As DB abstraction layer I wrote DDBC - library with interface similar to JDBC. Only MySQL driver is implemented. PostgreSQL - in progress. Project is

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

2013-04-03 Thread Vadim Lopatin
On Wednesday, 3 April 2013 at 18:36:16 UTC, Jacob Carlborg wrote: On 2013-04-03 16:28, Vadim Lopatin wrote: Hello! I've started implemetation of ORM in D, with annotations and interfaces similar to Hibernate. As DB abstraction layer I wrote DDBC - library with interface similar to JDBC.

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

2013-04-03 Thread Vadim Lopatin
I don't see what to simplify in markup like this: @Entity class User { @Generated long id; @Column string name; @ManyToOne Customer customer; @ManyToMany LazyCollection!Role roles; } Which translates to table