new version of lujan99 template

NHibernate Forum

new version of lujan99 template

Postby daniellujan on Thu Apr 26, 2007 12:04 am

- support: composite-id !!!
- generate helper-class for each composite-id !!!
- map/unmap by column or table.
- set name by column or table
- user defined relation one-to-many and zero-to-many
- support many-to-many
Download

TUTORIAL
daniellujan
Private First Class
 
Posts: 14
Joined: Tue Feb 27, 2007 12:54 pm
Location: Cordoba - Argentina

newversion 0.9.20

Postby daniellujan on Mon May 07, 2007 2:46 pm

-support COMPONENTS !!
-support drag/drop to define relationships and components
-contextual menu for unmap/map, set id, and set name.
-define id, composite-id and components in views
daniellujan
Private First Class
 
Posts: 14
Joined: Tue Feb 27, 2007 12:54 pm
Location: Cordoba - Argentina

new version 0.9.32

Postby daniellujan on Tue May 15, 2007 10:04 pm

- support subclass and joined-subclass
with definiton of discriminator value and key column.
- minimal constructor
(only columns not nullables and without default value)
daniellujan
Private First Class
 
Posts: 14
Joined: Tue Feb 27, 2007 12:54 pm
Location: Cordoba - Argentina

Postby MedicSean on Thu May 17, 2007 1:31 am

I don't know if you are taking feature requests, but it would be great if there was on option to implement INotifyPropertyChanged. Just some food for thought.

Thanks for such a great template!

Sean
MedicSean
Lurker
 
Posts: 1
Joined: Fri May 11, 2007 7:24 pm

Postby daniellujan on Thu May 17, 2007 12:00 pm

Yes! I think I can include INotifyPropertyChanged interface in next week revision.
Thanks.
daniellujan
Private First Class
 
Posts: 14
Joined: Tue Feb 27, 2007 12:54 pm
Location: Cordoba - Argentina

news 0.9.35

Postby daniellujan on Mon May 21, 2007 11:29 am

- add version/timestamp,
-add: implement INotifyPropertyChanged interface.
-fix some bugs.
daniellujan
Private First Class
 
Posts: 14
Joined: Tue Feb 27, 2007 12:54 pm
Location: Cordoba - Argentina

Postby mike.griffin on Mon May 21, 2007 11:41 am

Excellent job daniellujan, I know we have a lot of NHibernate users as can be seen by download counts on the NHibernate users. Thanx for all your guys' hard work on this.
User avatar
mike.griffin
Site Admin
 
Posts: 3290
Joined: Sat Apr 03, 2004 6:10 am
Location: Indianapolis, IN

1.0 version

Postby daniellujan on Mon May 28, 2007 1:09 pm

- add session comboBox, save each session separately.
- fix some bugs
daniellujan
Private First Class
 
Posts: 14
Joined: Tue Feb 27, 2007 12:54 pm
Location: Cordoba - Argentina

Re: 1.0 version

Postby safi on Sat Jun 02, 2007 5:43 am

Excellent job.
Please include schema name to generated mapping file like this:

<?xml version=\"1.0\" encoding=\"utf-8\" ?>
- <hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\">
- <!-- Build: with lujan99@usa.net Nhibernate template
-->
- <class name=\"ProductCatalog.BusinessObject.Category,ProductCatalog.BusinessObject\" table=\"Category\" lazy=\"true\" schema=\"Production\">
- <id name=\"Categoryid\" column=\"CategoryID\" type=\"int\">
<generator class=\"native\" />
</id>
<many-to-one name=\"CategoryMember\" column=\"ParentCategoryID\" cascade=\"save-update\" />
- <bag name=\"CategoryDescription\" inverse=\"true\" lazy=\"true\" cascade=\"delete\">
<key column=\"CategoryID\" />
<one-to-many class=\"ProductCatalog.BusinessObject.CategoryDescription,ProductCatalog.BusinessObject\" />
</bag>
- <bag name=\"CategoryProperty\" inverse=\"true\" lazy=\"true\" cascade=\"delete\">
<key column=\"CategoryID\" />
<one-to-many class=\"ProductCatalog.BusinessObject.CategoryProperty,ProductCatalog.BusinessObject\" />
</bag>
- <bag name=\"Product\" inverse=\"true\" lazy=\"true\" cascade=\"delete\">
<key column=\"CategoryID\" />
<one-to-many class=\"ProductCatalog.BusinessObject.Product,ProductCatalog.BusinessObject\" />
</bag>
</class>
</hibernate-mapping>

Thanks
safi
Lurker
 
Posts: 4
Joined: Fri Jun 01, 2007 12:18 pm
Location: Solymár - Hungary

Re: 1.0 version

Postby safi on Sun Jun 03, 2007 7:11 am

I made it! But I can't upload it!
safi
Lurker
 
Posts: 4
Joined: Fri Jun 01, 2007 12:18 pm
Location: Solymár - Hungary

1.0.3 version

Postby daniellujan on Mon Jun 04, 2007 2:48 pm

- add: optional schema attribute in class tags (safi request)
- readonly on-off in views.

safi: when you modified a template and upload, before generate a 'new guid'
a button on mygeneration. With your upload you overwrite it my last template version (1.0.2) with older version.
Thanks!!!
daniellujan
Private First Class
 
Posts: 14
Joined: Tue Feb 27, 2007 12:54 pm
Location: Cordoba - Argentina

Re: 1.0.3 version

Postby safi on Mon Jun 04, 2007 3:00 pm

Ok, thanks
Last edited by safi on Tue Jun 05, 2007 5:17 am, edited 1 time in total.
Safi
safi
Lurker
 
Posts: 4
Joined: Fri Jun 01, 2007 12:18 pm
Location: Solymár - Hungary

Re: 1.0.3 version

Postby safi on Mon Jun 04, 2007 3:16 pm

The format is wrong: shema = \"AdventureWorks.dbo\"
instead of this: schema = \"dbo\"

Thanks.
Safi
safi
Lurker
 
Posts: 4
Joined: Fri Jun 01, 2007 12:18 pm
Location: Solymár - Hungary

version 1.0.6

Postby daniellujan on Mon Jun 11, 2007 2:54 pm

add: string validation option.
fix bug: relations using primary key now map correctly separately
(one2one, zero2many)
daniellujan
Private First Class
 
Posts: 14
Joined: Tue Feb 27, 2007 12:54 pm
Location: Cordoba - Argentina

Generated code issue

Postby colinhumber on Tue Jun 12, 2007 5:02 pm

The template looks great! Quick question, though. When I generated the code of the Northwind database without changing any options it seems like the data types were not picked up. For the Product entity, for example, the instance fields look like this:

protected Unknown _productid;
protected Unknown _productname;
protected Suppliers _suppliers;
protected Categories _categories;
protected Unknown _quantityperunit;
protected Unknown _unitprice;
protected Unknown _unitsinstock;
protected Unknown _unitsonorder;
protected Unknown _reorderlevel;
protected Unknown _discontinued;

Is there something I need to tweak to get the data types read properly?

Thanks.
colinhumber
Lurker
 
Posts: 2
Joined: Tue Jun 12, 2007 5:00 pm

Postby daniellujan on Tue Jun 12, 2007 5:45 pm

:o mmmm,

have you in mygeneration dirs?:
Settings\\Languages.xml ....
I think you have something wrong with your mygeneration configuration.
daniellujan
Private First Class
 
Posts: 14
Joined: Tue Feb 27, 2007 12:54 pm
Location: Cordoba - Argentina

Postby colinhumber on Tue Jun 12, 2007 7:11 pm

Ah, yeah, that was it. I thought I had set my language to C# but it was in fact blank.
colinhumber
Lurker
 
Posts: 2
Joined: Tue Jun 12, 2007 5:00 pm

Cant execute this csgen file

Postby vischari on Wed Jul 11, 2007 3:02 am

Am getting the follg error.


MyGeneration 1.2.0.7
7/10/2007 8:01:18 PM

------------------------------------------
Index was outside the bounds of the array.

System.String RemoveSeparatorAndCapNext(System.String)

Call StackSystem.IndexOutOfRangeException: Index was outside the bounds of the array.
at Info.RemoveSeparatorAndCapNext(String input)
at l99_form.NodeProperty(TreeNode nd, IColumn c)
at l99_form.MapTableFromDb(ITable table, XmlNode nt)
at l99_form.updateTreeViewTables()
at l99_form.UpdateAll()
at l99_form.l99_form_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
vischari
Lurker
 
Posts: 3
Joined: Wed Jul 11, 2007 2:32 am

Postby daniellujan on Wed Jul 11, 2007 11:48 am

template's last version have fixed this bug. Thanks.
daniellujan
Private First Class
 
Posts: 14
Joined: Tue Feb 27, 2007 12:54 pm
Location: Cordoba - Argentina

Postby vischari on Wed Jul 11, 2007 3:45 pm

Thanks for the response. I had to reset mygen's default settings xml file to get it working.

BTW, Does this template, or any other for that matter, has support for lazy loading, fetch strategies, caching at the set/bag level?
vischari
Lurker
 
Posts: 3
Joined: Wed Jul 11, 2007 2:32 am

Next

Return to NHibernate

Who is online

Users browsing this forum: No registered users and 0 guests