You can implements your own batcher and inject it through NH configuration.
In your batcher you can nullify the row-count-check.
When you will have a real issue related to updated rows you can light a
candle in church and pray a while to find it.
On Tue, Aug 24, 2010 at 10:53 AM, empe...@gmail.com
How about giving us the full stack trace of this exception? We can guess all
day about the source.
On Tue, Aug 24, 2010 at 3:56 PM, José F. Romaniello
wrote:
> 2010/8/24 saeed-vakili
>
> from PGroup as p order by p.groupID asc
>
>
> There is a problem in your query "groupID" is the name of the C
2010/8/24 saeed-vakili
> from PGroup as p order by p.groupID asc
There is a problem in your query "groupID" is the name of the Column, but
the name of the property seems to be GroupId.
But, this is not the cause of the object reference exception, by sure.
Are you sure you have an instance of s
Hello my friends
I am a beginner in nhibernat.and I should develop an nhibernate
project.
In first step I want read a table from database and show its rows in a
gridview.
The table name is PGroup . the below method has problem and when run
this line
(IQuery iquery = session.CreateQuery(query);) lin
I've not seen much documentation, i just played with it to see what it did.
It really is very useful...
On Tue, Aug 24, 2010 at 5:12 PM, George Mauer wrote:
> Thanks for trying to help. Is there any documentation on what fetch
> actually does?
>
> On Aug 24, 11:08 am, philw wrote:
> > Hi Georg
When Equals is overridden, calling it causes proxy initialization.
But if you are loading the currencies in the same session, you don't need to
do that; NHibernate will create only one instance of each Curreny, so
default Equals or even == comparison will work.
Diego
On Tue, Aug 24, 2010 at
Ok, but then read this: "NHibernate is lazy, just live with it"
http://ayende.com/Blog/archive/2010/08/04/nhibernate-is-lazy-just-live-with-it.aspx
2010/8/24 chen leeing
> Thanks, james and José
>
> I will try ViewModel later.
> *Now, i'm set lazy to 'False' to fix this problem.*
> *
> *
> *Than
Sam,
If you have a particular issue using one of the new Oracle dialects, please
create another issue describing the problem, thanks.
The best description could be a failing test.
On Tue, Aug 24, 2010 at 9:17 AM, sferrise wrote:
> Forgive me if that's posted somewhere, but even browsing the sou
Thanks, james and José
I will try ViewModel later.
*Now, i'm set lazy to 'False' to fix this problem.*
*
*
*Thanks very much!*
*
*
*Regards,
litgle
*
On Tue, Aug 24, 2010 at 8:18 PM, José F. Romaniello
wrote:
> I agree with James, I have tried this long time ago, but I ended with this
> and other
Thanks for trying to help. Is there any documentation on what fetch
actually does?
On Aug 24, 11:08 am, philw wrote:
> Hi George
>
> When I use the fetch function it allows me to pull back an entire
> hierarchy in one sql call as it uses joins instead of separate sql
> calls. I'm not sure why yo
Hi George
When I use the fetch function it allows me to pull back an entire
hierarchy in one sql call as it uses joins instead of separate sql
calls. I'm not sure why your hieracrhy is creating so much sql.
I think the best thing for you to do would be to play with the fetch
statement, both in yo
Update: I tried the following:
public FolderHierarchyNode Get()
{
using (var s = _sessions.OpenSession())
return s.CreateQuery("select n from
FolderHierarchyNode n join fetch n._children")
.SetResultTransformer(new
global::NHibernate.
Not sure I get it Phil. Are you suggesting that I join NODES unto
itself and then preform a DistinctRootEnity transform?
On Aug 24, 9:43 am, philw wrote:
> Hi
>
> I think this might be of some help to you, ot was for me
>
> http://ayende.com/Blog/archive/2009/08/28/nhibernate-tips-amp-tricks-...
Well, I figured out that the NHibernate configuration wasn't properly
referencing the Common.DataObjects.dll for mapping files. So that
fixed the first error. Now it complains (rightfully so, RFTM) that I
can't use identity for the ID.
My question is then, what would you recommend as an alternativ
Have you marked the NewsItem.hbm.xml file as an Embedded Resource?
John Davidson
On Tue, Aug 24, 2010 at 10:19 AM, Carl B wrote:
> I have a common library used by many of our applications,
> Common.DataObjects.dll
>
> In this library, I have defined a NewsItem
>
> In our new calendaring applica
Hi,
I have this problem:
When I try to implement Ayende's complex searching found at:
http://ayende.com/Blog/archive/2006/12/07/ComplexSearchingQueryingWithNHibernate.aspx
with the object graph:
Person:
M:1 Address:
M:1 Street:
Frans,
Well can't change the database structure yet. Instead I fixed it this
way by changing my datetime property on my entity to remove
millseconds and seconds from the time.
[DomainSignature]
public virtual System.DateTime DateEntered
{
get
{
I get this error when trying to do like that:
System.Data.SqlClient.SqlException: An expression of non-boolean type
specified in a context where a condition is expected, near ','.
Incorrect syntax near the keyword 'join'.
Not sure if my approach is good.
Mapping was already there and I need to wri
Hi
I think this might be of some help to you, ot was for me
http://ayende.com/Blog/archive/2009/08/28/nhibernate-tips-amp-tricks-efficiently-selecting-a-tree.aspx
Phil
On Aug 24, 3:38 pm, George Mauer wrote:
> I have the following simple domain model representing a hierarchy:
>
> public clas
I have the following simple domain model representing a hierarchy:
public class FolderHierarchyNode
{
public virtual Guid Id { get; private set; }
public virtual string Name { get; private set; }
public virtual FolderHierarchyNode Parent { get; set; }
ICollect
why not use a 'timestamp' type instead? A date/time field is never going to
work, as SQLServer stores it with a precision of 300ms, so every action on
the row within 300ms will look like it's ok, while it's not.
FB
> Okay, I figured out what the issue is, but still wondering what to do.
T
Okay, I figured out what the issue is, but still wondering what to
do. The table is defined with the SQL datatype of "smalldatetime",
and therefore doesn't store the actual SECONDS portion of the time,
but nHibernate passes that in and therefore can't find the timestamp
value.
What do I do to tel
I have a common library used by many of our applications,
Common.DataObjects.dll
In this library, I have defined a NewsItem
In our new calendaring application, I've created a subclass,
CalendarNewsItem, which adds a few properties and methods to NewsItem.
This is in Common.Cal.dll
In this applic
I'm getting the following error when running the flush command after
trying to persist an object to the database. I've ran a SQL profiler
trace and I see what is wrong, but I don't know how to fix it.
Basically nHibernate is inserting the record to the database properly,
but when it goes to retri
We have an object model represented roughly by the following
interfaces:
///
/// Metadata of a version of an exported document.
///
public interface IExport
{
Guid Id { get; }
IList Requests { get; }
IExportRequest CurrentRequest { get; }
...
}
///
/// Represent
Hi,
Here you go.
Equality is tested by the Equals function below, that is what calls
the Id property.
On Aug 24, 3:50 pm, José F. Romaniello wrote:
> Please show your Currency class and mappings, and aslo show us how do you do
> the equality in currency.
--- Class ---
public class Currency
{
That's certainly some workaround. But not exactly I want. I don't want
to keep track of what I updated explicitly.
On Aug 24, 3:33 pm, Diego Mijelshon wrote:
> You can use an HQL update.
>
> Diego
>
> On Mon, Aug 23, 2010 at 03:26, empe...@gmail.com wrote:
> > Hello, It maybe a naive questi
This is the default behavior of NHibernate.
Please show your Currency class and mappings, and aslo show us how do you do
the equality in currency.
2010/8/24 vin
> Is there any way of telling NHibernate to return the Id value of the
> Currency object to me without loading the whole object?
>
--
Hi,
I have a problem with NHibernate loading too much data.
I have classes with an Id property, there are some many-to-one
relationships based on an the Id.
So for example a Country has a Currency.
I have a table of Countries and one of Currencies and there is a
CurrencyId column in the Country
I think index is just for scalar (lets say when you have a list or a map
with "map-key", or "index" in the old syntax).
I am not sure if you can use here the row-value-constructor syntax here, try
this:
from OrganisationNode node
inner join node.NodeNamePaths node_paths
where (:id, :mdbid) in ind
Hello,
I have problem to write HQL when DTO is having dictionary.
This is how mapping is look like:
And in DTO there is prop: IDictionary NodeNamePaths
I tried writing like this:
from OrganisationNode node
inner join node.NodeNamePaths no
You can use an HQL update.
Diego
On Mon, Aug 23, 2010 at 03:26, empe...@gmail.com wrote:
> Hello, It maybe a naive question but I am curious if there is anyway
> to turn off row update count.
> My scenarios is as follows:
>
> Consider a persistant entity and two concurrent sessions, where
I agree with James, I have tried this long time ago, but I ended with this
and other problems. Avoid it, write ViewModels
2010/8/24 James Gregory
> For exactly this reason, you shouldn't really bind directly against
> your domain entities; you should project those entities into DTOs and/
> or Vi
Forgive me if that's posted somewhere, but even browsing the source I
didn't see a difference between what I have in
NHibernate.Dialect.OraclexxDialect and what was in the repository. I
do see your comments on checkin indicating that there were new
versions, but I wasn't sure where they may be.
T
For exactly this reason, you shouldn't really bind directly against
your domain entities; you should project those entities into DTOs and/
or ViewModel's and bind against those instead.
On Aug 24, 3:57 am, litgle wrote:
> Now, i post fails code again:
>
> I have some DataGrid like this:
>
If your question isn't NHibernate related, it probably shouldn't be
asked on an NHibernate mailing list.
On Aug 24, 12:47 pm, osman nuri katib
wrote:
> I want to create a user control or another type control..
> which seems like that:
>
>
>
>
>
>
> ...
>
>
>
>
> 2010/8/24 Wayne Douglas
>
I want to create a user control or another type control..
which seems like that:
...
2010/8/24 Wayne Douglas
> what is all that?
>
> shudder.
>
> On Tue, Aug 24, 2010 at 12:05 PM, osman nuri katib <
> osmannurika...@gmail.com> wrote:
>
>> Hello I want to ask a question not related nhib
On Mon, Aug 23, 2010 at 4:58 PM, sferrise wrote:
>
> I looked at the patch specified in NH-1638 and it seems to correct the
> issue, but it doesn't appear that the patch has made it into any
> version of nHibernate.
>
>
Have you looked to all new dialects for Oracle ?
--
Fabio Maulo
--
You rec
what is all that?
shudder.
On Tue, Aug 24, 2010 at 12:05 PM, osman nuri katib wrote:
> Hello I want to ask a question not related nhibernate.
>
> How can I identify my collections?
>
> I want to override GridView control's collection like that:
>
>
>
>
>
>
> ...
>
>
>
>
> Is that possibl
I have solved the issue, I had a generic function that was setting all
the product collections and creating a circular reference.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to nhus...@googlegroups.com.
To unsubs
Hello I want to ask a question not related nhibernate.
How can I identify my collections?
I want to override GridView control's collection like that:
...
Is that possible?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this gr
I have a product object that contains 2 collections, accessories and
consumers. Consumers relates to an accessory, the list of products
that consume it. In the database I have a many to many relationship
for these collections that is implemented as a linking table
Product_Accessory. In mapping I ha
I am having a problem getting associated entities to be cached unless
they are specified (Not.LazyLoad() in mapping). If I build up a query
in Criteria or Linq the Main Entity is cached, but not associated
entities.
IList news;
using (var session = factory.OpenSession())
Hello,
I am encountering a regression bug in the NHibernate 3.0.0 builds.
The following mapping document now throws a
NHIbernate.MappingException with message "These classes referenced by
'extends' were not found":
It seems that the hi
You could consider writing a complex user type (implementation of
IComplexUserType) that reads/writes the values of the object_type and
object_data columns and performs the serialization/deserialization.
Regards,
Gerke.
On Aug 23, 8:36 am, Wayne Douglas wrote:
> Could you use discriminator?
>
>
Hi Thomas,
Okay, Method 2 should work for me since the contract always has to be
loaded anyway.
>From the random bits and pieces on the net I think the GetHashCode
method should compute the hashcode using my business key and the
Equals Method should get equality by comparing all properties. At
le
46 matches
Mail list logo