d)
.SetParameter("startDate", startDate)
.SetParameter("endDate", endDate)
.SetParameter("status", status)
;
return query.List();
}
On Jun 4, 11:09 pm, Corey Coogan wrote:
> I need to
I need to build a dynamic query from a search form. I have been using
Linq for NH and it's been great when the queries are simple. I just
build the query for the passed parameters, like so:
public IList GetOrdersBy(int? customerId=null, int? carId=null,
string status=null)
{
var query = Sessio
t. Since I know the actual details beyond the made-up snippit
I shared, I will bow out.
Thanks for all the help!
Corey
On Sep 14, 2:13 pm, José F. Romaniello wrote:
> 2010/9/14 Corey Coogan
>
> > For example, constraint violation,
>
> You never send something that may fail due
dates to
> fail?
> What's the use case? Concurrency?
>
> Diego
>
> On Tue, Sep 14, 2010 at 15:35, Corey Coogan wrote:
> > @Diego
>
> > Thanks for the advice. I agree that it would be ideal to have designs
> > that don't have to deal with exceptions,
ging your design so you DON'T get exceptions as part
> of your regular workflow.
>
> Diego
>
> On Tue, Sep 14, 2010 at 15:20, Corey Coogan wrote:
> > Would you elaborate what you mean by lower level? You mean working
> > directly against ADO? I'm not eve
ave to go
> lower-level.
>
> Diego
>
> On Tue, Sep 14, 2010 at 14:47, Corey Coogan wrote:
> > I have a scenario that I commonly run into. It's simple to do with a
> > standard ADO Transaction, but not so much with NH (that I know of).
>
> > I
I have a scenario that I commonly run into. It's simple to do with a
standard ADO Transaction, but not so much with NH (that I know of).
I have 2 tables to update. The first contains profile information
(Profile) and the other (Work) contains records changes that need to
be made and the status o
Thanks for your help. I'll try it again.
On Aug 13, 9:25 am, Diego Mijelshon wrote:
> That should work too (just tried)
> Be sure to
> checkhttp://nhforge.org/doc/nh/en/index.html#querysql-aliasreferences
>
> Diego
>
>
>
> On Fri, Aug 13, 2010 at 11:20
Foo", typeof(Foo))
> .AddJoin("Bar", "Foo.Bar")
> .List();
>
> That returns a list of Foo, with fully loaded Bar.
>
> The alias parameter is required by AddJoin, that's a mistake in the docs.
>
> Diego
>
>
>
>
he selected c.* columns contain al the
> data for the Client. So, you need to add c.* to the select list.
>
> Diego
>
>
>
> On Thu, Aug 12, 2010 at 17:11, Corey Coogan wrote:
> > I have the SqlQuery below. I will to eager load the Register and
&g
I have the SqlQuery below. I will to eager load the Register and
Client entities. Unfortunately, I always get an
IndexOutOfRangeException - Column Name doesn't exist in the Result
Set.
The Policy, Register and Client entities each contain only a subset of
the db tables. The Policy entity is loa
Hi gang!
I'm using Jimmy's Bogard's enumeration strategy described here:
http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/08/12/enumeration-classes.aspx
It works great like a component, when some entity is using it for a
status or something. I'm having trouble figuring out to do a one-t
ion is probably to switch to a better POID generator:
> guid.comb is my favorite, though many people prefer hilo.
>
>
>
> On Mon, May 17, 2010 at 9:24 AM, Corey Coogan wrote:
> > Hi gang,
> > I'm using Oracle 10g and I'm working on getting DBA's to m
Hi gang,
I'm using Oracle 10g and I'm working on getting DBA's to move
away from composite keys to surrogate keys. They have started the
migration on a few tables for me, but I've since learned during
development that the sequences are causing problems in SQLite.
I typically use SQL Server a
I have enabled query caching to use the
NHibernate.Caches.Prevalence.PrevalenceCacheProvider provider.
This is running on IIS 7, WCF service. I have limited rights to what
I can do, but I'm getting an exception about releasing cache locks.
I've created the following 2 directories in the system32/
:
> >http://www.agiledata.org/essays/keys.html
>
> > 2010/3/16 Corey Coogan
>
> > I'm trying to get my client to implement surrogate keys on their legacy
> >> database to make using an ORM more viable, among other reasons. I drafted
> >> a
> >>
I'm trying to get my client to implement surrogate keys on their legacy
database to make using an ORM more viable, among other reasons. I drafted a
quick document discussing the points and weighing surrogate keys against
natural keys.
I'm hoping to get some feedback and comments on what's miss
I'm hoping someone can help me with mapping a legacy database. The
problem I'm describing here has plagued others, yet I was unable to
find a real good solution around the web.
DISCLAIMER: this is a legacy DB. I have no control over the composite
keys. They suck and can't be changed no matter m
I think I've very close, but unfortunately not there yet. I made the
changes suggested by Diego but I'm still getting the Index Out of
Range exception. I don't have a version column, but am fighting for
one. Could that be what's causing the issue?
On Feb 25, 7:11 pm,
.
> >>>> I recreated your object model (which you didn't post) as this:
>
> >>>> public class Policy
> >>>> {
> >>>> public virtual int PolicyNumber { get; set; }
> >>>> public virtual DateTime PolicyDate { get; set; }
> >>>> public virtual IList Details { get; set; }
> >>>> }
>
> >>>> public class PolicyDetail
> >>>> {
> >&
e? I
> think the solution is more likely to be a tweak on that end, not the bag
> end.
>
> On Thu, Feb 25, 2010 at 1:43 PM, Corey Coogan wrote:
> > Thanks for the feedback Anne. My first post is correct, it is one to
> > many - One Policy to Many PolicyDetails.
>
>
ence as part of the primary key of the inbetween
> table? If so I'd map the inbetween table as a separate 3 part entity with
> many to one on either side.
>
> On Feb 25, 2010 12:52 PM, "Corey Coogan" wrote:
>
> Thanks John,
> this isn't quite what I need. I
This link help me when I was dealing with composite keys
>
> http://devlicio.us/blogs/anne_epstein/archive/2009/11/20/nhibernate-a...
>
> If you need more let us know.
>
> John Davidson
>
> On Thu, Feb 25, 2010 at 11:38 AM, Corey Coogan wrote:
> > I have a root object, Polic
I have a root object, Policy, that has a compositeKey of PolicyNumber/
PolicyDate.
The Policy has a one-to-many collection of PolicyDetails which have a
composite key of PolicyNumber/PolicyDate/Sequence. Sequence is an
assigned value that is set by the application.
My Mapping for Policy is below
I a one-to-many mapping that works in sql lite, but then blows up in
Oracle. If I make a slight change, it will work in Oracle, but not in
SQLITE.
Here's my mappings:
This works in SQL Lite
In Oracle, it adds CLient to the select, as if it were a column. It
throws an invalid identifier excep
I figured this out finally. I didn't specify my named query should
populate a collection. It was also VERY important to fully qualify my
class in the Role definition. Here's what my working named query
looks like now.
On Jan 29, 4:01 pm, Corey Coogan wrote:
> I
I'm beating my head against the wall here and hope to get some help
from somebody - anybody. I have a goofy table relationship on a one-
to-many mapping. I am trying to use a sql-query to define my query
and reference it via loader element in my one-to-many relationship
mapping. I've included th
I've searched books, doc and google for quite a while and cannot find
what the Mapped attribute of the composite-id element does? When
should this be set? Anybody know what this is for?
Thanks,
Corey
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
I obviously didn't mean IUserType, just IUserCollectionType for
collection. If there was an IUserType for entities as a whole, that
would be perfect.
Corey
On Jan 26, 1:34 pm, Corey Coogan wrote:
> I forgot to mention that I'm looking at using IUserType and
> IUserCOllectionT
I forgot to mention that I'm looking at using IUserType and
IUserCOllectionType to make this work, but would still appreciate
anyone's advice.
cc
On Jan 26, 12:35 pm, Corey Coogan wrote:
> I'm working with a legacy system. This system has 4 base tables in
> Oracle and t
I'm working with a legacy system. This system has 4 base tables in
Oracle and then will lay Views on top of these tables for specific use
cases. Some of these base tables have over 100 views sitting on top
of them. Each record in these base tables has an identifier (001,
002) that indicates whic
I posted this topic on the Fluent NH group and am looking how to
accomplish this with a straight XML mapping.
http://groups.google.com/group/fluent-nhibernate/browse_thread/thread/62e5f89c451cea85/d8dd0f42fdc6449e#d8dd0f42fdc6449e
The situation is this. I have 2 tables, Policy and CrdtCrdAcct. A
I've been trying to figure this one out for a while now and am hoping
someone can help me. I'm using Fluent NHibernate, but that doesn't
affect my question.
I am using a custom enumeration type, to get more than I would get out
of an enum type. I created a base IUserType implementation that wor
gt; But when you use NHibernate you can just regenerate your db.
>
> On Jul 10, 3:40 pm, Corey Coogan wrote:
>
>
>
> > I've read about and heard some people talking about how they will
> > create entire projects using NH and save the database generation until
> >
I've read about and heard some people talking about how they will
create entire projects using NH and save the database generation until
dead last. That sounds very interesting and can be done easily with
the Schema Export, but I'm unclear how to actually accomplish this.
Specifically, I'm confu
35 matches
Mail list logo