Re: [fluent-nhib] Mapping Hibernate to nhibernate

2020-02-11 Thread Oskar Berggren
What's wrong with it? The mapping XML for NHibernate should be the same I think. Hmm... or do you actually mean to convert it into FluentNHibernate syntax? Looks pretty straightforward to me: Map(p => p.Document).Column("Document").CustomSqlType("image"); What have you tried and what

Re: [fluent-nhib] Re: Broken assembly 4.1.0.4000 reference

2018-02-28 Thread Oskar Berggren
The "assembly version" is the version of the "API specification" and remains the same withing all 4.0.x releases and 4.1.x releases, respectively. This allows bug fix/security releases/minor improvement releases (e.g. 4.0.1, 4.0.2 etc to be drop in replacement not requiring recompile or binding

Re: [fluent-nhib] Re: [Proxy] Class hierarchy casting issue

2016-08-11 Thread Oskar Berggren
2016-08-11 14:05 GMT+01:00 mwpowellhtx <mwpowell...@gmail.com>: > > > On Thursday, August 11, 2016 at 8:47:18 AM UTC-4, Oskar Berggren wrote: >> >> >> >> 2016-08-11 13:33 GMT+01:00 mwpowellhtx <mwpow...@gmail.com>: >> >>> >>>

Re: [fluent-nhib] Re: [Proxy] Class hierarchy casting issue

2016-08-11 Thread Oskar Berggren
2016-08-11 13:33 GMT+01:00 mwpowellhtx <mwpowell...@gmail.com>: > > > On Thursday, August 11, 2016 at 8:22:07 AM UTC-4, Oskar Berggren wrote: >> >> >> >> 2016-08-11 12:33 GMT+01:00 mwpowellhtx <mwpow...@gmail.com>: >> >>> >>&g

Re: [fluent-nhib] Re: [Proxy] Class hierarchy casting issue

2016-08-11 Thread Oskar Berggren
2016-08-11 13:25 GMT+01:00 mwpowellhtx <mwpowell...@gmail.com>: > > > On Thursday, August 11, 2016 at 8:05:04 AM UTC-4, Oskar Berggren wrote: >> >> >> >> 2016-08-11 12:59 GMT+01:00 Oskar Berggren <oskar.b...@gmail.com>: >> >> >>&

Re: [fluent-nhib] Re: [Proxy] Class hierarchy casting issue

2016-08-11 Thread Oskar Berggren
2016-08-11 12:33 GMT+01:00 mwpowellhtx : > > > On Thursday, August 11, 2016 at 7:23:35 AM UTC-4, Rasmoo wrote: >> >> That's exactly Oskar's trick: You call the proxy, into the proxied object >> and get it to cast itself. >> > > No, that's not what Oskar wrote, one the one

Re: [fluent-nhib] Re: [Proxy] Class hierarchy casting issue

2016-08-11 Thread Oskar Berggren
2016-08-11 13:04 GMT+01:00 mwpowellhtx <mwpowell...@gmail.com>: > > > On Thursday, August 11, 2016 at 7:59:46 AM UTC-4, Oskar Berggren wrote: >> >> >> >> 2016-08-11 11:47 GMT+01:00 mwpowellhtx <mwpow...@gmail.com>: >> >>> >>>

Re: [fluent-nhib] Re: [Proxy] Class hierarchy casting issue

2016-08-11 Thread Oskar Berggren
2016-08-11 12:59 GMT+01:00 Oskar Berggren <oskar.bergg...@gmail.com>: > > > 2016-08-11 11:47 GMT+01:00 mwpowellhtx <mwpowell...@gmail.com>: > >> >> >> On Wednesday, August 10, 2016 at 1:20:15 PM UTC-4, Oskar Berggren wrote: >>> >>

Re: [fluent-nhib] Re: [Proxy] Class hierarchy casting issue

2016-08-10 Thread Oskar Berggren
You can put something like this in relevant base class: public TCastTarget As() { return (TCastTarget)this; } Then you don't have to turn off proxying. /Oskar 2016-08-10 18:02 GMT+01:00 Michael Powell : > On Wed, Aug 10, 2016 at 11:55 AM, Michael Powell

Re: [fluent-nhib] update using fluent nhibernate

2016-05-26 Thread Oskar Berggren
Look into versioning and optimistic or pessimistic locking, in the NHibernate reference manual, to resolve concurrent update attempts. For behavior of setting comment only if not already set, I would probably consider that to be business logic that should be handled above NHibernate. /Oskar Den

Re: [fluent-nhib] FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerExcept

2016-05-09 Thread Oskar Berggren
you've made a mistake. /Oskar 2016-05-09 12:11 GMT+01:00 Aki <marcosarrost...@gmail.com>: > i can't check innerexception because the error doesn't appear in my > solution, only on the executables in other computer. > > Thanks > > 2016-05-08 21:43 GMT-03:00 Osk

Re: [fluent-nhib] FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerExcept

2016-05-08 Thread Oskar Berggren
Btw, since it's a FluentConfigurationException, the mere presence of that should prove that the DLL has been found and loaded, so the problem need to be searched for elsewhere. /Oskar 2016-05-09 1:41 GMT+01:00 Oskar Berggren <oskar.bergg...@gmail.com>: > I think your message would

Re: [fluent-nhib] FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerExcept

2016-05-08 Thread Oskar Berggren
I think your message would have been clearer if you put the text in the body of the mail instead of abusing the subject. Having said that, did you follow it's suggestion to check all InnerExceptions? /Oskar 2016-05-09 1:05 GMT+01:00 marcos arrostito : > I have this

Re: [fluent-nhib] Add Class outside BIN folde

2015-09-07 Thread Oskar Berggren
You need to reserach assembly resolution and loading. This in itself have nothing to do with NHibernate or Fluent NHibernate really. Normally assemblies are expected to be in the same folder as the exe-file, or the bin-folder in web applications, or in the GAC, but there are ways. /Oskar

[fluent-nhib] Re: [nhusers] Re: NHibernate 4.0.3 Released

2015-06-18 Thread Oskar Berggren
Did you really mean to compare 1.0.2 with 4.0.3? NHibernate 1.0 is absolutely ancient. Or did you mix versions between NHibernate and FluentNHibernate? Assuming you really meant to compare those versions, well yes, there are breaking changes but a lot is the same. /Oskar 2015-06-18 14:08

Re: [fluent-nhib] Fluent nhibernate high memory consumption

2015-01-18 Thread Oskar Berggren
GetSessionFactory() is the OP's own method. Anyway, from the details given it's hard to tell if there is an actual problem or not. Also the posted code differs from the one in the screenshot. 5% of memory. Well... how much is that? Without knowing the absolute number (in MB) it's impossible to

Re: [fluent-nhib] Re: Fluent NHibernate - Delete one entity by Id somehow deleted ALL entities in the DB

2014-03-11 Thread Oskar Berggren
I would concur that the cascading rules are too liberal. Judging from the text in the article it sounds like a lazy way to add an object graph and only having to call Save() on a single starting point. I find that when it comes to cascading it's good to think about object ownership and lifetime.

Re: [fluent-nhib] FluentNHibernate 1.4.0.0 vs. FluentNHibernate 1.2.0.712: error when string is truncated

2014-03-06 Thread Oskar Berggren
2014-03-05 13:08 GMT+01:00 stephan.ku...@segelboerse-darmstadt.de: While researching for a solution to another problem, I upgraded my program (and it's unit tests) to FluentNHibernate 1.4.0.0. *Suddenly, some unit test which were running before *were failing. The reason was that I passed in a

Re: [fluent-nhib] FluentNHibernate 1.4.0.0 vs. FluentNHibernate 1.2.0.712: error when string is truncated

2014-03-06 Thread Oskar Berggren
version 3.3 still has the DLL version of 3.1, confusingly. So it's hard to know whether that's really NH 3.3 or not, but I agree that seems likely. On Thu, Mar 6, 2014 at 1:21 PM, Oskar Berggren oskar.bergg...@gmail.comwrote: 2014-03-05 13:08 GMT+01:00 stephan.ku...@segelboerse-darmstadt.de

Re: [fluent-nhib] NHibernate went from 3.5 to 4.0 - what to do now?

2013-08-19 Thread Oskar Berggren
All NHibernate 3.x releases target .Net 3.5, and will continue to do so. NHibernate 4.0 (not yet released) targets .Net 4.0. /Oskar 2013/8/19 Patric Forsgard pat...@tasteful.se Hi I don't know where you find the NHibernate 3.3 that target v4.0 of .net framework, the project-file that

Re: [fluent-nhib] Unable to cast 'NHibernate.Collection.Generic.PersistentGenericSet`1 to System.Collections.Generic.IList`1

2013-05-25 Thread Oskar Berggren
You have download iesi.collections 4.0 which is for use with .Net 4 (where ISet is builtin) and the future NHibernate 4.0. You should use the iesi.collections included with your copy of NHibernate. /Oskar 2013/5/25 Riderman Sousa riderma...@bindsolution.com Even after installing the package

Re: [fluent-nhib] Unable to cast 'NHibernate.Collection.Generic.PersistentGenericSet`1 to System.Collections.Generic.IList`1

2013-05-25 Thread Oskar Berggren
If you get (a recent) NHibernate via Nuget it should resolve to the correct Iesi dependency automatically. /Oskar 2013/5/25 Oskar Berggren oskar.bergg...@gmail.com You have download iesi.collections 4.0 which is for use with .Net 4 (where ISet is builtin) and the future NHibernate 4.0

Re: [fluent-nhib] One to Many relationship with multiple Primary Keys

2013-03-10 Thread Oskar Berggren
There is some semantic confusion here. You cannot have multiple primary keys in the same table (after all, that's why it's called primary). So I assume you mean that you want a primary key consisting of multiple columns in the job_items table. A common way to handle this is to have a class such

Re: [fluent-nhib] Fluent NHibernate will hopefully get a bugfix release in May

2013-02-12 Thread Oskar Berggren
This issue is closed, but IMHO not resolved in a usable way: ElementPart is missing Nullable https://github.com/jagregory/fluent-nhibernate/issues/37#issuecomment-11289617 Did you get around to look at the missing .Not qualifier? /Oskar 2013/2/7 Gleb Chermennov thebitteren...@gmail.com: Hello

Re: [fluent-nhib] Bug on CompositeId() when setting column length?

2012-12-26 Thread Oskar Berggren
:56 PM UTC+8, Oskar Berggren wrote: 2012/12/25 phin...@gmail.com: Hi Oskar, This is the composite-id fragment: composite-id key-property name=TransactId type=... column name=TransactId / /key-property key-property name=TransactType type=... length=2 column name

Re: [fluent-nhib] Bug on CompositeId() when setting column length?

2012-12-25 Thread Oskar Berggren
If you look at the XML mapping generated by fluent nhibernate's ExportTo(), is the length property present (and with what value) for the relevant key-property? /Oskar 2012/12/24 phinop...@gmail.com: Here i have the following mapping: CompositeId() .KeyProperty(e = e.TransactId, TransactId)

Re: [fluent-nhib] Bug on CompositeId() when setting column length?

2012-12-25 Thread Oskar Berggren
2012/12/25 phinop...@gmail.com: Hi Oskar, This is the composite-id fragment: composite-id key-property name=TransactId type=... column name=TransactId / /key-property key-property name=TransactType type=... length=2 column name=TransactType / When the optional column

Re: [fluent-nhib] problem mapping an association as a list

2012-12-20 Thread Oskar Berggren
A list is a data structure where element are associated with a numerical index in the list which governs the ordering of elements. NHibernate will persist this ordering using an index-column. A list in NHibernate will not be rearranged just be being persisted to the DB and then read back. Perhaps

Re: [fluent-nhib] Mapping

2012-12-17 Thread Oskar Berggren
I'm not sure I fully understand your question, but maybe this helps: https://github.com/jagregory/fluent-nhibernate/wiki/Fluent-configuration /Oskar 2012/12/17 Phelipe Brauna phelipebra...@gmail.com: Good afternoon guys, I have a problem, how do I create the sessionFactory when he do the

Re: [fluent-nhib] Transaction is commiting even with rollback

2012-10-23 Thread Oskar Berggren
I don't see any TransactionScope. Where are you disposing the session? Be aware that if you continue to use the session instead of disposing or clearing it (or open a new transaction) immediately after rollback, you run the risk of the session performing SQL INSERT/UPDATE outside of the

Re: [fluent-nhib] Transaction is commiting even with rollback

2012-10-23 Thread Oskar Berggren
, Oskar Berggren escreveu: I don't see any TransactionScope. Where are you disposing the session? Be aware that if you continue to use the session instead of disposing or clearing it (or open a new transaction) immediately after rollback, you run the risk of the session performing SQL INSERT

Re: [fluent-nhib] Transaction is commiting even with rollback

2012-10-23 Thread Oskar Berggren
session.Save/session.SaveOrUpdate, transaction management is handled by NHibernate (e.g. it will commit if no exceptions and rollback otherwise). Am I wrong? вторник, 23 октября 2012 г., 15:48:45 UTC+4 пользователь Oskar Berggren написал: Just to be clear, I did NOT imply that have to use

Re: [fluent-nhib] Error

2012-10-22 Thread Oskar Berggren
2012/10/22 Thiago Scheid mavericks.stu...@gmail.com Sorry, Message=composite-id class must override Equals(): Entity.Cooperado And there you have it. /Oskar -- You received this message because you are subscribed to the Google Groups Fluent NHibernate group. To post to this group,

Re: [fluent-nhib] NHibernate vs Entity

2012-10-11 Thread Oskar Berggren
This is the type of question best answered by google. :) The first three suggestions are below. If you have more detailed questions, it's more likely that someone on the list might be able to provide a useful answer.

Re: [fluent-nhib] Download FluentNHibernate binaries

2012-08-09 Thread Oskar Berggren
Continuous integration is available here: http://teamcity.codebetter.com/project.html?projectId=project8tab=projectOverviewguest=1 /Oskar 2012/8/8 Thomas Kehl kehlschw...@gmail.com Hi. I am searching the place where I can download the FluentNHibernate Binaries. Where url

Re: [fluent-nhib] How do i stop nvarchar(4000) from being used when passing parameters to the database

2012-06-28 Thread Oskar Berggren
2012/6/28 E DiPietro edipp...@gmail.com: this.Map ( x = x.PrevOrderSts ).Column ( prev_order_sts ).Not.Nullable ( ).Length ( 2 ); In the query p6 goes to this column, but contains 12 characters. This is your problem (maybe there are more column like this, I stopped at the first one). when

Re: [fluent-nhib] What's the proxyfactory low down?

2012-06-07 Thread Oskar Berggren
Since NH 3.2 there is a built in proxy generator which is used unless you explicitly tell if otherwise in the configuration. /Oskar 2012/6/7 Michael Powell mwpowell...@gmail.com: Need a general idea, what's the proxyfactory low down? As regards latest FNH? And latest NH that FNH incorporates?

Re: [fluent-nhib] Meta-NHibernate?!

2012-02-08 Thread Oskar Berggren
2012/2/7 Alex Maines alexmaines.softwareengin...@gmail.com: Dear all I recently wrote my own ORM system (long story).  It is basic but very effective. It has no known bugs, but few of the features of a sophisticated ORM tool like xHibernate.  I do think it could be extended to have more

Re: [fluent-nhib] Many to Many relation without a link table?

2012-02-02 Thread Oskar Berggren
2012/2/2 James Farrell jamespfarr...@gmail.com: I have inherited a legacy database that doesn't have foreign keys on these 2 tables, and therefore not surprisingly, no join table. If I'm not misataken creating a join table now is impossible since I can't create a foreign key on either of

Re: [fluent-nhib] Many to Many relation without a link table?

2012-02-02 Thread Oskar Berggren
2012/2/2 Oskar Berggren oskar.bergg...@gmail.com: 2012/2/2 James Farrell jamespfarr...@gmail.com: I have inherited a legacy database that doesn't have foreign keys on these 2 tables, and therefore not surprisingly, no join table. If I'm not misataken creating a join table now is impossible

Re: [fluent-nhib] Many to Many relation without a link table?

2012-02-02 Thread Oskar Berggren
I can do this using HQL? James On 2 February 2012 11:06, Oskar Berggren oskar.bergg...@gmail.com wrote: 2012/2/2 Oskar Berggren oskar.bergg...@gmail.com: 2012/2/2 James Farrell jamespfarr...@gmail.com: I have inherited a legacy database that doesn't have foreign keys on these 2 tables

Re: [fluent-nhib] CheckReference errors in unit test

2011-12-11 Thread Oskar Berggren
2011/12/11 cem...@gmail.com cem...@gmail.com: I'm getting this error: System.ApplicationException : For property 'Account' of type 'xxx.Account' expected 'xxx.Account' but got 'Castle.Proxies.AccountProxy' The Account model itself maps fine, and unit tests fine, but when it's referenced

Re: [fluent-nhib] Saving data

2011-11-25 Thread Oskar Berggren
2011/11/25 KNP shreeya.prasa...@gmail.com: Hi All, I have a wcf service hosted using Nettcp binding through wndows service.I am using FNH for data layer. My model completely saves with out any issues in console application,but some how the same thing is failing in Windows Service Do you

Re: [fluent-nhib] Problems when mapping fields in SQLServer

2011-11-11 Thread Oskar Berggren
Most likely the References clause looks at the C# type for Persona.PerIdPer, which is long, i.e. bigint, and isn't aware of the custom sql type. Specify the custom type in the References clause also. Btw, there is a C# type decimal also. /Oskar 2011/11/11 Banzai alba2...@gmail.com: hello

Re: [fluent-nhib] Re: criteria.ListT problems

2011-11-10 Thread Oskar Berggren
));                        break;                }            }            return criteria;        } Thanks. Kim On Nov 9, 4:28 pm, Oskar Berggren oskar.bergg...@gmail.com wrote: The code you quote doesn't show much of importance. The interesting stuff would be happening in GetCriteria() most

Re: [fluent-nhib] criteria.ListT problems

2011-11-09 Thread Oskar Berggren
The code you quote doesn't show much of importance. The interesting stuff would be happening in GetCriteria() most likely. However, a guess is that the query is using joins causing the rows of the primary type to be duplicated in the result set from the database. /Oskar 2011/11/9 kimbered

Re: [fluent-nhib] To flush or not to flush

2011-11-08 Thread Oskar Berggren
2011/11/8 Michael Powell mwpowel...@gmail.com: Hello, I've got an NHibernate performance optimization question. I believe what I am seeing has to do with SaveOrUpdate() latency, but I'm not 100% sure of it. What's going on is this: I've got a data service which job it is to factory create

Re: [fluent-nhib] Select N+1 for child entities

2011-06-23 Thread Oskar Berggren
batch-size in your mappings. /Oskar 2011/6/23 Agha ar...@progressivemediagroup.com: I have a fairly deep object graph (5-6 nodes), and as I traverse portions of it NHProf is telling me I've got a Select N+1 problem (which I do). Is it possible to tell NHibernate (with fluentnhib) that

Re: [fluent-nhib] Select N+1 for child entities

2011-06-23 Thread Oskar Berggren
2011/6/23 Joe Brockhaus joe.brockh...@gmail.com: Will upping batch-size improve performance for me? Should be easy to test. Normally yes. /Oskar -- Joe Brockhaus joe.brockh...@gmail.com -- On Thu, Jun 23, 2011 at 11:32 AM, Oskar Berggren oskar.bergg...@gmail.com wrote: batch

[fluent-nhib] Stable build for NH 3.1?

2011-03-07 Thread Oskar Berggren
Hi, nhforge has not been updated yet, but it seems NH 3.1 has been released: http://twitter.com/fabiomaulo/status/44092764396339200 and is available on sourceforge. Will there be an updated stable build soon? Thanks, Oskar -- You received this message because you are subscribed to the Google

Re: [fluent-nhib] Change Mapping from enum to the State Pattern

2011-01-13 Thread Oskar Berggren
There are probably several possibilities, but in some cases I've implemented the State classes as immutable value objects, and provided a well-known instance for each state as static members of some class. For me it was then enough to have a custom user type that could convert from the State

Re: [fluent-nhib] Re: Can not compile FNH under Mono

2010-11-18 Thread Oskar Berggren
Not all .dlls are created equal - a .NET .dll is generally not win32-specific. /Oskar 2010/11/18 VŠ kafe.caj.a.suse...@gmail.com: Hi, thanks for response. Did you mean, that I can just use FluentNHibernate.dll and NHibernate.dll, etc.. compiled for Win32? :D I understand the MSIL/CIL (I

Re: [fluent-nhib] Split table contents across multiple POCOs

2010-11-10 Thread Oskar Berggren
Components? /Oskar 2010/11/10 James Gregory jagregory@gmail.com: Alternatively you might consider using subclasses. On 10 Nov 2010, at 04:31, fel0nious fel0ni...@gmail.com wrote: Is this possible? Ideally, I'd rather not *have* to do this, but that's not up for discussion,

Re: [fluent-nhib] Auto Increment in FLuent Nhibernate and PostgreSQL

2010-10-07 Thread Oskar Berggren
Though you should also be aware of the consequences of letting the database generate the id. See for example: http://nhforge.org/blogs/nhibernate/archive/2009/03/20/nhibernate-poid-generators-revealed.aspx /Oskar 2010/10/7 Yann ROBIN me.s...@gmail.com: Hi, PostgreSQL have serial types that

Re: [fluent-nhib] Many To Many mapping to only remove relationship

2010-07-06 Thread Oskar Berggren
Is the order of Genres assigned to shows important to you? If it is, you will need a column in the database to store the index. If it isn't, don't use an indexed interface like IList, use ICollection or ISet instead. Apart from that, what problems are you experiencing? /Oskar 2010/7/6 Buddy

[fluent-nhib] Depreciated versus deprecated

2010-05-24 Thread Oskar Berggren
Hi, I get some warnings after having upgraded fluent NH due to changes in the mapping API. I will fix those, but I did notice that the warnings speak of depreciated API. I'm only familiar with that term from finance, when assets loose value over time. :) I believe the warnings should be