I have a many-to-many association and I was wondering if I can map the
many-to-many element to an enum like:
(DaysOfWeek is an enum)
This doesn't work, but maybe there's a better way ?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group
This is from an asp.net mvc point of view
I have a unit of work that starts roughly around the time the action
on the controller begins executing. Now Objects are loaded, changes
are made and then a transaction starts when the saving part begins . I
actually will have only one class that needs to
> > But are you saying that (2) causes the OnPreUpdate to get called?
>
> > I guess I could get that answer by commenting out the
> > entity.CreatedDate = createdDate and see if the OnPreUpdate gets
> > called.
>
> > Sorry for asking for further clarification.
>
ing another problem.
> Immediately after running through my OnPreInsert code for all the
> entities being created, the OnPreUpdate is called for all the same
> entities.
>
> On Aug 11, 9:57 am, sirrocco wrote:
>
> > If in an Event , onOnPreInsertI set a property ( RecordSt
If in an Event , on OnPreInsert I set a property ( RecordStamp) like
so :
var index = Array.FindIndex(names, n => n == "RecordStamp");
if (index == -1) return;
state[index] = DateTimeService.Now;
Can this cause an update after the insert ? The thing is that after
the app enter
/7/16 Raul Carlomagno
>
> > > maybe this can be useful for you
>
> > >http://nhforge.org/wikis/howtonh/simple-audit-metadata-and-logical-de...
>
> > > On 16 jul, 14:06, sirrocco wrote:
> > > > Anyone ?
>
> > > > On Jul 16, 8:52 am, sirrocco
Anyone ?
On Jul 16, 8:52 am, sirrocco wrote:
> Is there any way to know if the entity from the SaveOrUpdateEvent
> object has been modified since the time it was loaded ?
>
> There are objects that are loaded and not modified at all and I want
> to set the RecordStamp only on
Is there any way to know if the entity from the SaveOrUpdateEvent
object has been modified since the time it was loaded ?
There are objects that are loaded and not modified at all and I want
to set the RecordStamp only on those that have been modified. I can't
find a property to check for this in
So there's no way of using the HQL without specifying typed
parameters ? Damn.
Oh well, thanks for your help.
On Jul 6, 4:13 pm, Fabio Maulo wrote:
> Change NHDataSource source in order to provide typed parameters.
>
> 2009/7/6 sirrocco
>
>
>
>
>
Hi,
I've been using NHibernateDataSource for a while now and it used
nhibernate 1.2.
I'm changing to version 2.1.0 of NH and I ran into a problem :
Internally NHDataSource builds an HQL query and then sets parameters
with :
query.SetParameter(p.Name, p.Value);
p.Value is an objects and comes f
I did say that I'm using v1.2.1 right ? There's no SetMaxResults on
DetachedCriteria.
I ended up using 2 separate queries - not ideal but it will do.
Thanks anyway.
On Mar 10, 2:25 pm, Fabio Maulo wrote:
> SetMaxResults
>
> 2009/3/10 sirrocco
>
>
>
>
>
&
I can live without the group by, but how do I set a top 1 ?
I'm using v1.2.1.4000. - I see that there is a setMaxResults in the
trunk - is there no way in v1.2.1.4000 to do this ?
On Mar 10, 11:19 am, sirrocco wrote:
> SELECT * FROM ProductRenameHistory this_
> WHERE this_
SELECT * FROM ProductRenameHistory this_
WHERE this_.HistoryKey =
(SELECT Top 1 this_0_.HistoryKey as y0_
FROM ProductRenameHistory this_0_
WHERE this_0_.WasRolledback = 0
GROUP BY this_0_.HistoryKey , this_0_.RecordStamp
ORDER BY this_0_.RecordStamp desc)
The abov
a
> Toksözhttp://turkiyealt.nethttp://tunatoksoz.comhttp://twitter.com/tehlike
>
> Typos included to enhance the readers attention!
>
> On Sun, Feb 15, 2009 at 11:51 AM, sirrocco wrote:
>
> > I'd like to implement something similar (or allot simpler if it turns
> > out
Where can I read more on NH event architecture ? I know I can look at
the code, but I'd like to do some reading first.
I'd like to implement something similar (or allot simpler if it turns
out to be overkill ) so any blogs, articles or replies are appreciated.
--~--~-~--~~
;
> Gustavo.
>
> On Thu, Jan 8, 2009 at 5:51 PM, sirrocco wrote:
>
> > Hi, I've been following the steps from :
>
> >http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/11/09/firs...
> > , in order to test the second level cache.
>
> > Now
Hi, I've been following the steps from :
http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/11/09/first-and-second-level-caching-in-nhibernate.aspx
, in order to test the second level cache.
Now , these are the settings in the config file,
true
true
NHibernate.Cache.HashtableCach
It seems that the FetchMode is working, but at some point the code is
touching the Client property (no ideea what that point is).
Sorry for all the nagging :) .
On Dec 11, 3:25 pm, "Fredy Treboux" <[EMAIL PROTECTED]> wrote:
> Try leaving fetch="join" on many-to-one mapping, but removing lazy="fa
aid it still loads the Client
> one-by-one, this is correct as you have set fetch="join" which will
> force a inner join. You can still use the fetchmode property but you
> will have to remove the fetch join from the mapping.
>
> On Dec 11, 6:20 am, sirrocco <[EMAIL PR
=true, this is the only think that it comes to
> my mind.
>
>
>
> On Thu, Dec 11, 2008 at 12:56 PM, sirrocco <[EMAIL PROTECTED]> wrote:
>
> > Modifying the mapping would be more difficult because then I would
> > have to modify allot in Code.
>
> > I would lik
enker" <[EMAIL PROTECTED]> wrote:
> you have to set Lazy Load in the mapping of the client class! That is
>
>
>
> then it works!
>
> On Thu, Dec 11, 2008 at 8:58 AM, sirrocco <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> > I have a class ClientXCli
What you put in the where clause will not be substituted - i think
it's raw sql.
On Dec 11, 10:41 am, Henning <[EMAIL PROTECTED]> wrote:
> hmm, though I noticed, that it seems like the substitutions are not
> applied to the where-attribute?
>
> I want to filter out stuff with "IsActive=true" wher
Hi,
I have a class ClientXClientCriteria that has a property named Client
mapped as
Now, at some point I don't want to load the Client so i'm trying to
force a lazy load.
IList listClientXClientCriteria =
Repository.CreateCriteria ()
nd thanks :).
> >>>
> >>> On Sun, Dec 7, 2008 at 10:45 AM, me <[EMAIL PROTECTED]> wrote:
> >>>>
> >>>> And I found the ManyToOne in fluentnhibernate - it's References
> >>>>
> >>>> On Sun, Dec 7, 2008 at 10:42 AM,
quot; <[EMAIL PROTECTED]> wrote:
> one-to-one should be one to many
>
> On Sun, Dec 7, 2008 at 10:09 AM, sirrocco <[EMAIL PROTECTED]> wrote:
>
> > I have the folowing mapping file :
>
> > > lazy="false" assembly="X" namespace
I have the folowing mapping file :
It was generated using fluent nhibernet. Now , on
GenerateSche
You could mark the properties XmlIgnore, or NotSerialized so they are
ignored.
Or - my choice : create some DTO's that map exactly what you need to
send over the wire - that way you have no problems with proxies. So
you don't send the Entity , you send the DTO.
On Dec 6, 10:31 pm, Steve <[EMAIL P
It's a bit strange mate :)
Here's your first HQL :
"from StorageProduct m where m.asOfDateTime in (select max
(s.asOfDateTime) from StorageProduct s)"
and should be :
"from StorageProduct m where m.asOfDateTime in (select max
(s.asOfDateTime) from StorageProduct s group by s.storage_id)"
But n
You forgot the Group By in the HQL query.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [
You forgot to put the Group By in the HQL query.
On Nov 24, 6:40 am, marducci <[EMAIL PROTECTED]> wrote:
> I just found another query that satisfies what i need. The one below
> might be easier to write in HQL.
>
> SELECT * FROM mmt_storage_product
> WHERE asofdatetime IN (SELECT MAX(asofdatetim
30 matches
Mail list logo