After reading this excellent article :
http://20.targetprocess.com/2006/08/entity-life-cycle-in-nhibernate.html
I finally understood why our Validation model was not hitting on Updates!
I thought it was some-kind-of-bug but it was definitively not so.
Since we just have released GenWise v1.09
--> this topic will be included in the next version of the Templates.
Monday, June 25, 2007
Wednesday, May 30, 2007
Intersystem Cache NHibernate Driver/Dialect
For a project we had to use Intersystem's Cache.
I've create the NHibernate Dialect and Driver (based on the Java version as a source).
I don't really know where to post this files so here they go : Download NHibernate Cache Driver/Dialect.
I now need to learn:
* Where to post so this get's added to Nhibernate.
* Before that step : are there any tests for new dialects (should i write them, how? )
My tests show 1 problem:
When trying to create a parameterized query using system.guid as parameter type i get this exception: CacheException : Type out of range: System.Guid
Failures:
1) Standard_BoLayer.Tests.Email_AddressesTest.FetchTest : NHibernate.ADOException : could not execute query
[ SELECT this_."Email Address-ID" as Email1_7_0_, this_."Member_id" as Member2_7_0_, this_."System #" as System3_7_0_, this_."Mail@" as Mail4_7_0_, this_."Include in Mailing" as Include5_7_0_ FROM "dbo"."Email Addresses" this_ WHERE this_."Email Address-ID" = ? ]
Positional parameters: 0 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
[SQL: SELECT this_."Email Address-ID" as Email1_7_0_, this_."Member_id" as Member2_7_0_, this_."System #" as System3_7_0_, this_."Mail@" as Mail4_7_0_, this_."Include in Mailing" as Include5_7_0_ FROM "dbo"."Email Addresses" this_ WHERE this_."Email Address-ID" = ?]
----> InterSystems.Data.CacheClient.CacheException : Type out of range: System.Guid
at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
I've create the NHibernate Dialect and Driver (based on the Java version as a source).
I don't really know where to post this files so here they go : Download NHibernate Cache Driver/Dialect.
I now need to learn:
* Where to post so this get's added to Nhibernate.
* Before that step : are there any tests for new dialects (should i write them, how? )
My tests show 1 problem:
When trying to create a parameterized query using system.guid as parameter type i get this exception: CacheException : Type out of range: System.Guid
Failures:
1) Standard_BoLayer.Tests.Email_AddressesTest.FetchTest : NHibernate.ADOException : could not execute query
[ SELECT this_."Email Address-ID" as Email1_7_0_, this_."Member_id" as Member2_7_0_, this_."System #" as System3_7_0_, this_."Mail@" as Mail4_7_0_, this_."Include in Mailing" as Include5_7_0_ FROM "dbo"."Email Addresses" this_ WHERE this_."Email Address-ID" = ? ]
Positional parameters: 0 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
[SQL: SELECT this_."Email Address-ID" as Email1_7_0_, this_."Member_id" as Member2_7_0_, this_."System #" as System3_7_0_, this_."Mail@" as Mail4_7_0_, this_."Include in Mailing" as Include5_7_0_ FROM "dbo"."Email Addresses" this_ WHERE this_."Email Address-ID" = ?]
----> InterSystems.Data.CacheClient.CacheException : Type out of range: System.Guid
at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters)
Saturday, April 28, 2007
GenWise Templates and the Project life-cycle
One of the unique features of the GenWise Template System is the fact that the templates are always alive during your project life-cycle. The Generation process is not a single step (normally an initial step) but it's present during the whole life-cycle.
This has major advantages:
#1) Template can adapt themselves to new scenarios
This is basically achieved by the fact that their input meta-data can change and template will regenerate their code according to the new input.
Several templates have "Auto Calculated Template Options", for this cases the advantage is even greater since the templates will also adapt the default values of the Template Options (Questions to the user).
#2) Template Option Changes can be easier applied since the Template Options are still available at the end of the project.
#3) Same applies to Global Changes, or global extension : like adding Security Template, make project Ajax aware ( Ajax Templates ), or any other extension.
#4 ) Template itself (new version) can improve or fix a specific scenario and this change might automatically apply to all template instances in your projects.
To make this possible, the IDE needs to keep a Project System. This project system is part of the GenWise Framework which contains ALL your project meta-data.
This has major advantages:
#1) Template can adapt themselves to new scenarios
This is basically achieved by the fact that their input meta-data can change and template will regenerate their code according to the new input.
Several templates have "Auto Calculated Template Options", for this cases the advantage is even greater since the templates will also adapt the default values of the Template Options (Questions to the user).
#2) Template Option Changes can be easier applied since the Template Options are still available at the end of the project.
#3) Same applies to Global Changes, or global extension : like adding Security Template, make project Ajax aware ( Ajax Templates ), or any other extension.
#4 ) Template itself (new version) can improve or fix a specific scenario and this change might automatically apply to all template instances in your projects.
To make this possible, the IDE needs to keep a Project System. This project system is part of the GenWise Framework which contains ALL your project meta-data.
MySQL GetSchema("Views")
Today i've spend some time debugging why when we use GenWise Studio to import a MySQL database, Views (supported only in MySQL 5.x ) where not imported as VIEWS but where treated as normal TABLES.
Applies to : ODBC 5.00.11 (latest from website) and 3.54.14 shows same behaviour. Server version : 5.0.22
Having an odbc connection with catalog/database set to a specific database when executing this commands :
_connection.GetSchema("Tables") --> returns tables + views (should have been only tables)
If this was expected behaviour it would have been handy that "TABLE_TYPE" could be set as view.. (currently set as TABLE)
_connection.GetSchema("Views") --> returns null.
ODBC TRACE (just partial...)
When requesting VIEW ( _connection.GetSchema("Tables") ) --> 15 are returned instead of 14 (1 is a view)
NOTE: When INFORMATION_SCHEMA (at the server ) shows correct / expected result
SELECT * FROM information_schema.VIEWS V;
Applies to : ODBC 5.00.11 (latest from website) and 3.54.14 shows same behaviour. Server version : 5.0.22
Having an odbc connection with catalog/database set to a specific database when executing this commands :
_connection.GetSchema("Tables") --> returns tables + views (should have been only tables)
If this was expected behaviour it would have been handy that "TABLE_TYPE" could be set as view.. (currently set as TABLE)
_connection.GetSchema("Views") --> returns null.
ODBC TRACE (just partial...)
When requesting VIEW ( _connection.GetSchema("Tables") ) --> 15 are returned instead of 14 (1 is a view)
NOTE: When INFORMATION_SCHEMA (at the server ) shows correct / expected result
SELECT * FROM information_schema.VIEWS V;
Friday, April 27, 2007
SourceGear Vault branching tool
Inside GenWise we had very often the situation that for testing a specific new feature we would need to create separate SourceGear Vault branch.
That's why Ward Bekker created this free tool to share with the community : Vault Branching Tool
That's why Ward Bekker created this free tool to share with the community : Vault Branching Tool
Subscribe to:
Posts (Atom)