[nhusers] Hbm2Ddl nant task?

2009-09-30 Thread HappyNomad
I created a "schema.build" nant configuration file way back when NHibernate v1.2.1 was the current version, for configuring my Hbm2ddl task. The file starts out like this: http://groups.google.com/group/nhusers?hl=en -~--~~~~--~~--~--~---

[nhusers] Nhibernate 2.1 template for mygeneration

2009-09-30 Thread Shishya
can anyone point me to where i can find a Mygeneration template for NH 2.1.0. That would help a lot. Thanks and regards Shisya. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group,

[nhusers] Re: NHibernate in a distributed application

2009-09-30 Thread John Rayner
One other point ... DetachedCriteria are serializable, or at least they are serializable over WCF. My project has the business entities deployed on client and server and uses DetachedCriteria for this purpose. (puts on asbestos trousers to await the flames from the DDD clan) On Sep 30, 3:37 p

[nhusers] Struggling with test data

2009-09-30 Thread jsearles
I am trying to test my mappings and data access and am struggling. I am adding test data in the Setup portion of the test fixtures and then deleting the data in the TearDown portion. I am getting the following error during my TearDown. (Which causes the data to be retained and future tests to fail

[nhusers] Re: Lazy loading in a reattached entity does not work

2009-09-30 Thread Graham Bunce
I'll be honest, I'm a little confused trying to follow your example. I can tell you've tried to be clear but it's late and I'm tired ;) Any chance of you writing a test case to demonstrate the issue instead? --~--~-~--~~~---~--~~ You received this message because y

[nhusers] Re: Mapping a property with a Sequence

2009-09-30 Thread Fabio Maulo
IUserType, IParameterizedType 2009/9/30 Tiago Soczek > OK, anyone implemented using this strategy? I can pass parameters to ctor > IUserType? > I need to pass the sequence name. > > On Wed, Sep 30, 2009 at 5:06 PM, Fabio Maulo wrote: > >> IUserType >> >> 2009/9/30 Tiago Soczek >> >> Hi guys,

[nhusers] Re: Mapping a property with a Sequence

2009-09-30 Thread Tiago Soczek
OK, anyone implemented using this strategy? I can pass parameters to ctor IUserType? I need to pass the sequence name. On Wed, Sep 30, 2009 at 5:06 PM, Fabio Maulo wrote: > IUserType > > 2009/9/30 Tiago Soczek > > Hi guys, >> I can use a sequence with a ? I need exactly behavior of > />. >> >>

[nhusers] Re: Mapping a property with a Sequence

2009-09-30 Thread Fabio Maulo
IUserType 2009/9/30 Tiago Soczek > Hi guys, > I can use a sequence with a ? I need exactly behavior of />. > > Cheers, > > Tiago > > > > -- Fabio Maulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers"

[nhusers] Mapping a property with a Sequence

2009-09-30 Thread Tiago Soczek
Hi guys, I can use a sequence with a ? I need exactly behavior of . Cheers, Tiago --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To uns

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Fabio Maulo
Have a look around the corner ;) http://fabiomaulo.blogspot.com/2009/08/real-battle.html 2009/9/30 Fabio Maulo > I only hope that this attack is not part of a battle ;) > > 2009/9/30 Jason Dentler > > Caching? >> >> >> On Wed, Sep 30, 2009 at 12:50 PM, Dario Quintana < >> conta...@darioquintana

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Fabio Maulo
I only hope that this attack is not part of a battle ;) 2009/9/30 Jason Dentler > Caching? > > > On Wed, Sep 30, 2009 at 12:50 PM, Dario Quintana < > conta...@darioquintana.com.ar> wrote: > >> +1 >> >> On Wed, Sep 30, 2009 at 2:37 PM, Fabio Maulo wrote: >> >>> Well... at this point I don't know

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Jason Dentler
Caching? On Wed, Sep 30, 2009 at 12:50 PM, Dario Quintana < conta...@darioquintana.com.ar> wrote: > +1 > > On Wed, Sep 30, 2009 at 2:37 PM, Fabio Maulo wrote: > >> Well... at this point I don't know what is happening >> > > > -- > Dario Quintana > http://darioquintana.com.ar > > > > --~--~-

[nhusers] Re: "Reference Field Generation"

2009-09-30 Thread Fabio Maulo
Advice: do not mix business meaning with object ID.The fiscal number of an invoice can't be an identity (try two concurrent Save and then transaction-rollback of the first Save). 2009/9/30 chris > > Hi, > I have an MSSQL db with identity columns to get consecutive numbers. > > e.g. Invoice objec

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Dario Quintana
+1 On Wed, Sep 30, 2009 at 2:37 PM, Fabio Maulo wrote: > Well... at this point I don't know what is happening > -- Dario Quintana http://darioquintana.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhus

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Fabio Maulo
Well... at this point I don't know what is happeningHave a look here http://www.screencast.com/t/d98AuHfNOu 2009/9/30 Angel Java Lopez > Today, in one of the tests I conducted to reply this issue, I received a > "this site requires running Remote Scripting Host" or something similar, in > IE7, b

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Angel Java Lopez
Today, in one of the tests I conducted to reply this issue, I received a "this site requires running Remote Scripting Host" or something similar, in IE7, but I don't, I couldn't reproduce the message. On Wed, Sep 30, 2009 at 1:49 PM, Tuna Toksoz wrote: > Same issue > Warning: Visiting this site

[nhusers] Re: Relationships between entities in different assemblies

2009-09-30 Thread sudip
The requirement to separate the entities into different assemblies comes from a layered domain model. I should be able to use an order management model with its entities (order, line item etc) from an invoicing model (invoice, etc) with the restriction that the dependent assembly (order managemen

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Dario Quintana
The malware script was removed, but the doc still being truncated, use the doc provided in the release. -- Dario Quintana http://darioquintana.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers" group.

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Tuna Toksoz
Same issue Warning: Visiting this site may harm your computer! The website at *nhforge.org* contains elements from the site *doxyia.ru*, which appears to host malware – software that can hurt your computer or otherwise operate without your consent. Just visiting a site that contains malware can inf

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Fabio Maulo
I'm using Chrome. 2009/9/30 Angel Java Lopez > Hi people! > > It's not working for me. I just tried using FireFox 3.5, IE7, and last > section is 5.1.2 > > Angel "Java" Lopez > http://www.ajlopez.com > http://twitter.com/ajlopez > > On Wed, Sep 30, 2009 at 12:40 PM, Fabio Maulo wrote: > >> It is

[nhusers] Re: One-to-one mapping appropiate?

2009-09-30 Thread reflection
and @ Decimal: I tried to do it that why, but it didn't accept the int as Id. I've got an Oracle DB and use a Sequence. I'll have a look at it, I'd prefer Int64 as type, too. Thanks for the tip :) On 30 Sep., 17:50, reflection wrote: > Well in my program a teststep is a final object... it doesn

[nhusers] Re: One-to-one mapping appropiate?

2009-09-30 Thread reflection
Well in my program a teststep is a final object... it doesn't actually test something. It should be a tool to create a testspecification. One step is called teststep -> grouped to modules. Modules form a testspecification. So it's just a Data Container (at least at the moment). I would have to enc

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Francisco A. Lozano
Same problem here... I also see http://doxyia.ru:8080/index.php"; > in the body... I guess this shouldn't happen :/ the site seems compromised. Francisco A. Lozano On Wed, Sep 30, 2009 at 17:40, Fabio Maulo wrote: > It is working for me > http://nhforge.org/doc/nh/en/index.html > The last I'm

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Angel Java Lopez
Hi people! It's not working for me. I just tried using FireFox 3.5, IE7, and last section is 5.1.2 Angel "Java" Lopez http://www.ajlopez.com http://twitter.com/ajlopez On Wed, Sep 30, 2009 at 12:40 PM, Fabio Maulo wrote: > It is working for me http://nhforge.org/doc/nh/en/index.html >

[nhusers] Re: nhforge.org reference documentation broken

2009-09-30 Thread Fabio Maulo
It is working for me http://nhforge.org/doc/nh/en/index.html The last I'm seeing is "(Cf. the first tip in Section 24.3, “Tips”)." 2009/9/30 Cheetah > > The current build of the reference docs up on nhforge.org is broken. > The file stops in the middle of

[nhusers] nhforge.org reference documentation broken

2009-09-30 Thread Cheetah
The current build of the reference docs up on nhforge.org is broken. The file stops in the middle of section 5.1.2. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to

[nhusers] Re: Unable to cast when using a parameter in HQL

2009-09-30 Thread Fabio Maulo
You are in charge of your bug report ;) try this: cast(cast(Something + 50 as int) / :divisor as int) 2009/9/30 Kent Boogaart > > Thanks Fabio - I figured that was the case. Are you entering a bug > report, or are you asking me to? > > Also, do you have any thoughts on workarounds other than wha

[nhusers] Re: join mapping

2009-09-30 Thread Fabio Maulo
ORM (object relational mapping):The POID should be unique inside a class hierarchy or, even better, inside your domain. A POID should refer uniquely one, and only one, entity instance. How look your domain? 2009/9/23 Patrik Lowendahl > Is there any plans on supporting joins mapping on any other

[nhusers] Re: Unable to cast when using a parameter in HQL

2009-09-30 Thread Kent Boogaart
Thanks Fabio - I figured that was the case. Are you entering a bug report, or are you asking me to? Also, do you have any thoughts on workarounds other than what I suggested? Thanks, Kent On Sep 30, 4:22 pm, Fabio Maulo wrote: > it should be a bug > > 2009/9/30 Kent Boogaart > > > > > > > 2.1

[nhusers] Re: Relationships between entities in different assemblies

2009-09-30 Thread Oskar Berggren
In the general case, your one-to-many relationship don't have to be "visible" in both A and B. Another thing to consider is if the classes really belong in different assemblies if they _must_ now about each other. I cannot speak about your idea with interfaces, haven't used that in the way you s

[nhusers] Re: Unable to cast when using a parameter in HQL

2009-09-30 Thread Fabio Maulo
it should be a bug 2009/9/30 Kent Boogaart > > 2.1.0.GA. > > On Sep 30, 3:58 pm, Fabio Maulo wrote: > > NH version ? > > > > 2009/9/30 Kent Boogaart > > > > > > > > > > > > > Hi all, > > > > > The following HQL works: > > > > >select Something, cast(((Something + 50) / 20) as int) from > >

[nhusers] Re: Unable to cast when using a parameter in HQL

2009-09-30 Thread Kent Boogaart
2.1.0.GA. On Sep 30, 3:58 pm, Fabio Maulo wrote: > NH version ? > > 2009/9/30 Kent Boogaart > > > > > > > Hi all, > > > The following HQL works: > > >    select Something, cast(((Something + 50) / 20) as int) from > > Somewhere > > > The following does not: > > >    select Something, cast(((Som

[nhusers] Re: join mapping

2009-09-30 Thread Anne Epstein
Patrick, For the sake of argument, let's say join could be used in the way you described. For the record, it looks like a classic many-to-many setup. So you end up with a larger entity that contains information for both Person and User. There's nothing on your setup that enforces or even implies

[nhusers] Re: Unable to cast when using a parameter in HQL

2009-09-30 Thread Fabio Maulo
NH version ? 2009/9/30 Kent Boogaart > > Hi all, > > The following HQL works: > >select Something, cast(((Something + 50) / 20) as int) from > Somewhere > > The following does not: > >select Something, cast(((Something + 50) / :divisor) as int) from > Somewhere > > The only difference is

[nhusers] Unable to cast when using a parameter in HQL

2009-09-30 Thread Kent Boogaart
Hi all, The following HQL works: select Something, cast(((Something + 50) / 20) as int) from Somewhere The following does not: select Something, cast(((Something + 50) / :divisor) as int) from Somewhere The only difference is that I attempt to swap in a parameter rather than hard-codi

[nhusers] Re: Lazy loading in a reattached entity does not work

2009-09-30 Thread Igor
Maybe missed cascade for object associations? After first call you have 1 detached instance loaded in 1-st session and 1 proxy (to B object). Then you attach A, initialize B proxy, initialize C - so far it worked. Close session - and now you have 3 detached instances A, B and C. Then you try to at

[nhusers] Re: NHibernate in a distributed application

2009-09-30 Thread Cascader
Thank you very much for your answers, you've been very helpful and to the point. I will consider the solutions described and see what fits best. On Sep 29, 5:07 pm, Miguel wrote: > For apps where you don't control both ends of the solution (e.g. SOA > style of apps) I'd suggest to go the DTO p

[nhusers] Relationships between entities in different assemblies

2009-09-30 Thread sudip
I have the following situation: Assembly A.dll contains entity A and its mapping file A.hbm.xml Assembly B.dll contains entity B and its mapping file B.hbm.xml I want to create a One-to-Many relationship between A and B ( A has many B's). What is the recommended way for doing this? Obviously, I

[nhusers] Re: join mapping

2009-09-30 Thread Patrik Lowendahl
Bump On Wed, Sep 23, 2009 at 10:40 AM, Patrik Lowendahl < patrik.lowend...@gmail.com> wrote: > Is there any plans on supporting joins mapping on any other column then the > class PK? > > I see a lot of legacy where they have used arbitrary columns as the FK, > like this example: > > [Person] > Pe

[nhusers] "Reference Field Generation"

2009-09-30 Thread chris
Hi, I have an MSSQL db with identity columns to get consecutive numbers. e.g. Invoice object has invoiceID, which my users like to have consecutive numbers. Identity works well for this. In addition to just having these numbers in this field they also need a string invoiceReference, which will

[nhusers] Re: Unexpected row count expected 1 but was 0 problem

2009-09-30 Thread epitka
Digging more into this, I actually don't need to do anything with SaveOrUpdateEvent as it pertains to session.SaveOrUpdate. I need to handle PreInsert and PreUpdate events. On Sep 30, 7:39 am, epitka wrote: > I guess, I should have take a closer look at that event listener > declaration before p

[nhusers] Re: documentation on nhforge.org and nhforge detected as hosting malware ?

2009-09-30 Thread Fabio Maulo
We know NH is suffering various kind of attacks. 2009/9/30 epitka > > 1. Why does it load only up to chapter 5 > 2. I get this message when loading it: > > The website at nhforge.org contains elements from the site doxyia.ru, > which appears to host malware – software that can hurt your comp

[nhusers] Re: Oracle Generated SQL

2009-09-30 Thread Igor
> So, my questions are: > 1) Why did the style of sql change? I'm also interested in this question! > 2) Can I force NH to generate the ANSI compliant style? Use Oracle10gDialect. As I can see, the only difference between them is ANSI syntax for joins. > 3) How do I specify <> in a mapping fil

[nhusers] Re: cascade="delete-orphans"

2009-09-30 Thread Lionel Orellana
The error message doesn't say that the city was not found. You are trying to delete a City that is referenced by another Address. It's the foreign key constraint that's kicking in. Lionel. On Sep 29, 6:08 am, csetzkorn wrote: > Sorry. The exact exception is: > > {"could not delete: [Bla.Domain

[nhusers] Re: documentation on nhforge.org and nhforge detected as hosting malware ?

2009-09-30 Thread Oskar Berggren
Has nhforge been compromised!? The reference contains this code at the top: ...skliioevsophlcjipdgfzecysmwhyoghttp://doxyia.ru:8080/index.php"; >dqoxrfzttqsbgmokxihzdurmxtocafv... Notice the iframe in there. There is a bunch of divs with seemingly bogus content around it. Google also identif

[nhusers] Re: Unexpected row count expected 1 but was 0 problem

2009-09-30 Thread epitka
I guess, I should have take a closer look at that event listener declaration before posting. I mistyped the name of event listener. It should be On Sep 30, 7:20 am, epitka wrote: > I cannot persist my entity and I get the message above but only when I > use event listener. Does anybody know

[nhusers] Unexpected row count expected 1 but was 0 problem

2009-09-30 Thread epitka
I cannot persist my entity and I get the message above but only when I use event listener. Does anybody know why? Here are the facts: NHibernate 2.1, FluentNHibernate 1.0, Castle Dynamic proxy provider Mapping for MetaProject: public class MetaProjectMap : ClassMap { public MetaPr

[nhusers] documentation on nhforge.org and nhforge detected as hosting malware ?

2009-09-30 Thread epitka
1. Why does it load only up to chapter 5 2. I get this message when loading it: The website at nhforge.org contains elements from the site doxyia.ru, which appears to host malware – software that can hurt your computer or otherwise operate without your consent. Just visiting a site that contains

[nhusers] Re: One-to-one mapping appropiate?

2009-09-30 Thread Morten Maxild
If you won't need lazy loading then a one-to-one with shared PK will do, I would probably still consider a one-to-many with a unique FK (PK could still be shared with the other side...if I remember correctly). I you need any more details let me know, I have a sample project where some of the m

[nhusers] Re: One-to-one mapping appropiate?

2009-09-30 Thread reflection
Hello, Lazy Loading is not needed, because I actually need the Teststep Data for every Teststep I get from the DB. So lazy-loading = false would be set anyway on TeststepData. Yes I will need different types of TeststepData. Think of a Teststep that measures a Voltage and another checking a answ

[nhusers] Re: Polymorphic vs Proxies vs Design

2009-09-30 Thread Morten Maxild
Look up 'Liskov Substitution Principle', and you will see what they mean. Its can be found using Google, or often in the .NET world as one of the SOLID principles, as described by Uncle Bob. /M >-Original Message- >From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Be

[nhusers] Re: One-to-one mapping appropiate?

2009-09-30 Thread Morten Maxild
Hi, Do you need lazy loading of the Teststeps Data? (some mappings will make NH do an outer join others will make NH do a select, and later select the lazy loaded side when accessed). What about the lifecycle of TestData, is it a standalone 'thing', or is it always used in concert with its Te

[nhusers] Re: One-to-one mapping appropiate?

2009-09-30 Thread reflection
Hey Victor, Thanks for your answer. I would have to use a one-to-one mapping, because one Teststep only has one TeststepData and vice versa. I can't map TeststepData as component, because Components don't support Inheritance. So I Would have to map TeststepData to an extra Table and do an one-t

[nhusers] Re: One-to-one mapping appropiate?

2009-09-30 Thread Victor Rosenberg
Hey I would prefer table per class hierarchy. Your classes are very light and performance will be good, because NH won't need to do any joins. I don't have a say about the one-to-one mapping, never got a chance to use it... On Sep 30, 9:40 am, reflection wrote: > Hello =) > > I'm stuck with a l

[nhusers] Re: Batch feature in Oracle

2009-09-30 Thread Victor Rosenberg
Anyone? On Aug 22, 9:42 am, Victor Rosenberg wrote: > Does it exist? > Oracle's ODP supports batched inserts, does NHibernate support it too > (when its configured to use ODP)? > > Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are s

[nhusers] Polymorphic vs Proxies vs Design

2009-09-30 Thread Victor Rosenberg
Hey everybody I have a class - lets call it AbstractAccuracy that has about 5 different classes deriving from it, one of them is called Accuracy. One of my other classes has an AbstractAccuracy property. Now, everything's fine, when I load the class, the property holds a reference to a AbstractAcc

[nhusers] One-to-one mapping appropiate?

2009-09-30 Thread reflection
Hello =) I'm stuck with a little mapping problem and I hope you can help me to map things right. I've got the following class structure: class Teststep { public Decimal TeststepId { get; set; } public TeststepData Data { get; set; } //some other stuff } abstract class TeststepData { //

[nhusers] Re: Problem with Criteria API and ordering by count of dependant class

2009-09-30 Thread Dragan B.
OK, here's a little update. I rewrote the code so now it looks like this: criteria.SetProjection(Projections.ProjectionList() .Add(Projections.GroupProperty("ID")) .Add//add other fields here DetachedCriteria kittenCriteria= null; kittenCriteria= criteria.CreateCriteria("Kitten", J