As a side note, you don't have to have a reference, you just have to
ensure that DLL and thouse it uses are copied into the bin folder when
building. One simple way is adding a reference, the other is adding
the DLLs to the project with a build action of “copy if newer”.
On Jul 20, 4:58 pm, Paul H
Ah sorry, you're using a class there for the key, so you want:
CompositeId(x => x.Zone).KeyProperty(x =>
x.BusinessCode).KeyProperty(x => x.ZoneCode);
On Jun 25, 7:54 pm, Chris C wrote:
> Should be as simple as, CompositeId().KeyProperty(x =>
> x.BusinessCode).KeyP
Should be as simple as, CompositeId().KeyProperty(x =>
x.BusinessCode).KeyProperty(x => x.ZoneCode);
On Jun 23, 3:41 pm, Berto wrote:
> Hi,
> I have a problem with a composite-id mapping on a legacy database. How
> can I create a mapping like this with Fluent Nhibernate??
>
>
>
>
>
erty mapping of Name found
> in Scala.Map
>
> I use this create script:
>
> Fluently.
> Configure()
> .Database(MySQLConfiguration.Standard.ConnectionString(c
> => c
>
NHibernate is really intended to always use transactions. The newer
versions tend to complain unless you turn of the transaction checking.
If you don't create a transaction the database will have to create an
implicit one per statement anyway.
On Jun 12, 8:49 am, Derek Greer wrote:
> I usually u
; > I'm just using default hilo settings. I'm recreating the DB with
> > SchemaUpdate/Export beforehand, and the Hibernate_Unique_Key table
> > with the next_hi column is being created correctly.
>
> > Here's the original mapping line that works:
>
> >
NHibernate always requires a unique key of some kind when mapping
tables/views to entities.
On May 28, 7:53 am, Stig wrote:
> I'm trying to map a view without an identifier, but nhibernate still
> generates a sql with the id column (giving me a sql error, since the
> ID column does not exists in
AA should be a SubclassMap and you should use the same Type column to
discriminate all sub-classes for that hierarchy.
Any other way doesn't really make sense to NHibernate as the base
table is telling NHibernate "I'm a class of type AA" then the "AA"
table is trying to tell NHibernate, "no actual
only use one subclass strategy per class; you
> > can't mix them. Unless I'm mistaken, this is an NHibernate restriction
> > rather than a Fluent design decision.
>
> > On Mon, May 10, 2010 at 9:28 AM, Dana Efros wrote:
>
> >> Hi, All
> >> I have 4
MembershipProvider is based upon a singleton pattern, you'll only get
one MembershipProvider for the lifetime of the application, so you
can't inject a specific session into it.
Only way to handle this is to inject a session factory into it and
have it create its own session, or inject an ICurrent
>
> I don't think so. Because if I replace a linq query with this:
> var docs = session.CreateCriteria().List();
>
> I get expected results. What's puzzling at this point, though, is that
> I see a single select statement **with no joins** (select ... from
> Document) so I don't know really where N
>
> Question 1: What am I doing wrong and how can I eager load
> subentities?
>
This is standard behavior for NHibernate, when using the criteria api
you would use the DistinctRootEntity transform, I can only assume that
maps to LINQ's Distinct since I havn't used LINQ to NH yet.
>
> Question 2:
Should quoting fields like this be the responsibility of Fluent
NHibernate? What about using hbm2ddl.keywords and
SchemaMetadataUpdater as demonstrated in
http://fabiomaulo.blogspot.com/2009/06/auto-quote-tablecolumn-names.html
?
With an opt-in/out option for its use as part of the fluent
configur
have this problem to map:
>
> tblProgram
> {
> int programID (PK)
> String Program Name
>
> }
>
> tblProgramType
> {
> int programTypeID (PK)
> String programTypeName
>
> }
>
> tblProgramProgramTypes
> {
> int ProgramID (PK)
&g
Also worth checking out is
http://nhforge.org/blogs/nhibernate/archive/2009/03/20/nhibernate-poid-generators-revealed.aspx
which has a comparison of the various POID (persistent object id)
generation strategies.
On Jan 11, 2:30 pm, clayton collie wrote:
> Use
> Id(x=>x.Id).GeneratedBy.HiLo("som
Here's the fix for it
http://github.com/chilversc/fluent-nhibernate/commit/34e71adbefff6ffc17a5d5f7ff6c7d70954cfaf5
Note, to run the unit tests you'll also need to have these settings,
http://www.meadow.se/wordpress/?p=393 .
Without them sqlite will fail, and nunit won't be able to run.
On Dec 2
This would be a problem with your dialect, the dialect for Oracle maps
a guid as RAW(16). I'm not exactly sure on how to set it up to treat
guids as strings instead, you could try asking on hibernate forums.
On Dec 17, 12:38 pm, Alex McMahon wrote:
> I've got 2 classes that use Guid as their Id.
What if you filter the results on the SpecialUser side instead, i.e.
include the where clause as part of SpecialUserMap.
On Dec 15, 12:14 am, James Gregory wrote:
> My bad, SpecialUser and SpecificUser are a little close for my
> post-midnight brain to differentiate.
>
> On 12/15/09, Ethan wrote
After adding the new fields did you update the mapping for the entity?
On Dec 14, 11:40 am, Paul Batum wrote:
> I'm not sure why your extra columns weren't generated. But I can answer your
> second question regarding the Configuration parameter to the BuildSchema
> method. The Configuration class
Ok, I've committed a fix for this and sent a pull request.
On Dec 6, 2:45 am, Chris C wrote:
> I'm just pointing out potential breaking changes, should really
> maintain a log of these so when publishing new releases they can be
> listed.
>
> On Dec 6, 12:30 am, James Gr
bug and it should be fixed. Well spotted.
>
> On 12/6/09, Chris C wrote:
>
>
>
> > This seems like a bug to me, ClassInstance only resets the value of
> > nextBool if the mapping is specified:
>
> > E.g.
> > if (!mapping.IsSpecified("DynamicI
8b1a44
and the previous 2 commits.
On Nov 29, 4:09 am, Chris C wrote:
> Ah yes, not sure how I managed that as it was correct at one point.
>
> I've fixed it now, should have been using expectedAccess.
>
> I've also added the remaining tests that were to do and now the o
This seems like a bug to me, ClassInstance only resets the value of
nextBool if the mapping is specified:
E.g.
if (!mapping.IsSpecified("DynamicInsert"))
{
mapping.DynamicInsert = nextBool;
nextBool = true;
}
So if we assume Dyna
Another thing to be careful of is if you are able to get nhibernate to
convert invalid values to null, nhibernate will probably at some point
try to persist that back to the database as null removing the value
that is in there unless you mark the column as read-only.
On Dec 1, 12:00 pm, Asbjørn Ul
I've seen the problem, defaultColumn is not updated in PropertyPart
after clearing the column collection.
As setting the column name in the overload also calls
propertyMap.Column(columnName) it won't work either way.
PropertyPart.cs
public PropertyPart Column(string columnName)
{
>
>
>
> On Wed, Nov 4, 2009 at 11:40 AM, Chris C wrote:
>
> > Is there a convention that targets composite keys that use
> > WithKeyProperty / reference. It's the key properties and references
> > I'm actually after in this case, as I'm trying to mak
Developer, Team Lead Backup (.Net Technologies) – Applications
> Delivery - TDG
> Injazat Data Systems
> P.O. Box: 8230 Abu Dhabi, UAE.
>
> Phone: +971 2 6992700
> Direct: +971 2 4045385
> Mobile: +971 50 2623624, +971 55 2017 621
>
> E-mail: eng.mel...@gmail.com
> Weblog:http://
You're problem is in the mapping file. A convention won't overwrite a
mapping if there is one, this makes it easy in a convention to set
defaults if a value hasn't been provided by the mapping but without
having to ensure you're not overwriting an existing mapping.
In you're mapping itself you're
I've just been setting core.autocrlf to false, as when it was true git
kept saying the whole file had changed (same as what you seem to be
suffering).
On Nov 4, 2:43 pm, Jon Kruger wrote:
> I came up with a fix that seems to be working for me, and all of tests
> pass. I'm still learning Git, so
Is there a convention that targets composite keys that use
WithKeyProperty / reference. It's the key properties and references
I'm actually after in this case, as I'm trying to make the this test
pass:
http://github.com/chilversc/fluent-nhibernate/blob/access-convention/src/FluentNHibernate.Testin
Does Fluent currently support setting the key column of a one-to-many
mapping as not nullable? For example, generating the following xml:
...
If so, how can this be achieved?
Thanks,
Gen
--~--~-~--~~~---~--~~
You received this message because you a
What I want is a convention for property access, i.e. all properties
should use either Access.BackField() or Access.CamelCaseField() unless
an explicit access type has already been set.
Initially I tried using IPropertyConvention but this only applied to
properties and not references, one-to-many
On Oct 1, 1:53 pm, Anatoly wrote:
> Is it possible to map property to formula with FH like this:
>
>
>
>
>
>
> type="Int32"/>
Certainly, Map.(x => x.DayOfWeek).Formula("DATEPART(dw, Time) - 1")
--~--~-~--~~~---~--~~
You received this
When I create a table-per-subclass with discriminator (using
SubclassMap(){ Join{ ...}), if the JoinPart contains a one-to-one
mapping, then that mapping doesn't seem to be generated in the NH
config.
--~--~-~--~~~---~--~~
You received this message because you are
Hi,
I have an automapped "ShortUrl" entity and would like to enable second
level caching for.
My configuration uses the old fashioned hibernate.cfg.xml, so I added:
true
NHibernate.Caches.SysCache.SysCacheProvider,
NHibernate.Caches.SysCache
(and the NHibernate.Caches.SysCache Ass
Hi,
I just upgraded to 1.0RC. However, it looks like FNH has stopped
escaping table & column names with ` in the mapping XML (so the
runtime SQL isn't surrounding them with square brackets [])
Is there a new convention, or nhibernate configuration property, I can
enable?
(My "User" entity is Au
ok, I admit, a little bit :D
On Tue, Feb 17, 2009 at 11:59 PM, James Gregory wrote:
> That looks a little bit involved for my liking... ;)
> Applied, thanks!
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Flue
running into is unrelated: I'm using a SQLite .db
file as my test database, and the SchemaExport() tool is not emitting
the foreign key creation SQL code.
Sorry for the noise.
On Feb 14, 6:16 pm, "Ed C." wrote:
> Hi, list --
>
> I'm using the AutoPersistenceModel
+1 We're also using burrow, and passing around the Configuration would
be great!
On Feb 10, 9:22 pm, Paul Batum wrote:
> James, could we add an overload for the Fluently.Configure method that takes
> an existing Configuration? That would probably give Mark a nicer alternative
> here.
>
> Paul
>
reignKey()
(I have recently discovered the joys of FNH - thanks for all the hard
work!)
Thanks for your time,
Ed C.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to t
James,
Excellent work. I can assure you it is much appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com
To u
=> x.Id, "AccountId");
> >> Map(x =>
> >> x.Type).TheColumnNameIs("admAccountTypeId").CustomTypeIs(typeof
> >> (AccountType));
> >> Map(x =>
> >> x.Status).TheColumnNameIs("admAccountStatusId").CustomTypeIs(typeof
&g
I have defined a class called Account that has three properties whose
types are three different enumerations. The properties are named
"Type", "Status" and "LeadStatus," and they are of type "AccountType",
"AccountStatus" and "LeadStatus" respectively. These values are stored
as FK integers in a S
43 matches
Mail list logo