This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Guys,
I've noticed a possible bug in the designer when using MySQL and Views.
If you copy a view over from a MySQL designer it creates the Entity without any problems but it leaves the "Table Name" field in its properties blank so any calls to it throw exceptions.
Easily fixed of course by setting it manually but thought you might want to know.
Cheers
|
|
|
Hi Mike, The table name should normally be blank, because LightSpeed will infer the table name from the entity name. For example, if you drag a table or view named Customer onto the design surface, it will create an entity named Customer, and LightSpeed can automatically map that back to the original table or view without needing to be told that the table is also called Customer. One thing that may be causing the issue is if table/view names are plural in your database, e.g. Customers rather than Customer. In this case you will need to specify PluralizeTableNames = true on your LightSpeedContext (so that LightSpeed, when it sees a Customer entity, knows to map it to the Customers table instead of the Customer table). (If you have a mix of plural and singular names then you will need to use the Table Name property.) If that's not the problem, would it be possible for you to post the exception message and stack trace, and also the SQL CREATE VIEW script for the view that's causing the problem. Thanks! |
|