EdisonCP / sharp-architecture

Automatically exported from code.google.com/p/sharp-architecture
Other
0 stars 0 forks source link

AutoMappingOverride class doesn't feel affects of WithTable command #126

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a class that inherits from Entity
2. Create a class map file implementing the IAutoMappingOverride interface
3. In the Override method, call mapping.WithTable, providing a table name
that does NOT match convention against the class

What is the expected output? What do you see instead?
I was expecting to see the SQL query use the table referenced, instead it
uses the table name determined by convention from the class. Other
overrides take affect as expected like mapping.Id() and mapping.Map().

What version of the product are you using? On what operating system?
1.0 RTM on Vista

Please provide any additional information below.

Original issue reported on code.google.com by thepanto...@gmail.com on 15 Sep 2009 at 9:29

GoogleCodeExporter commented 8 years ago
As an update, I've discovered that my problems lies in that the conventions 
that come
OOB with S#arp are being applied AFTER the overridden conventions I've defined.

Original comment by thepanto...@gmail.com on 16 Sep 2009 at 2:35

GoogleCodeExporter commented 8 years ago
With that being said, I don't see this as a problem with the S#arp Arch. but an 
issue
with Fluent NHibernate... please ignore as you see fit.

Original comment by thepanto...@gmail.com on 16 Sep 2009 at 2:40

GoogleCodeExporter commented 8 years ago
Personally, I don't like the sequence in which the overrides are applied, 
specifically 
due to what you encountered.

Original comment by wmccaffe...@gmail.com on 30 Sep 2009 at 9:10

GoogleCodeExporter commented 8 years ago
Any update on this? I've been bitten by this issue (also using 1.0 RTM)

Original comment by marista...@gmail.com on 5 Nov 2009 at 2:03

GoogleCodeExporter commented 8 years ago
Nope. The way I got around this was to modify the conventions used to take into
account the exceptions.

Original comment by thepanto...@gmail.com on 5 Nov 2009 at 3:11

GoogleCodeExporter commented 8 years ago
Me too. I ended up removing the addition of the conventions in 
AutoPersistanceModelGenerator.

Original comment by marista...@gmail.com on 5 Nov 2009 at 3:33