yj wrote:
How do we log the errors if they happened to be coming from the generated code?
LLBL has a series of errors that will be thrown if it encounters a problem with the generated sql statement, for a full list search the docs for ORMException. there are exceptions for:
out of sync entities
concurrrency exceptions
validation excepetions
invalid sql statements
etc.
It is your task to handel these errors. usually 1 of 3 methods is choosen
1. log4net
2. ent lib 1.0, 2.0 or 3.0
3. catch and ignore (not recommended
)
yj wrote:
Based on my study, every row of the data from the table are retrieved all in once (for that particular row). If given a table with 50 attributes (e.g. name, address, attrib3...attrib50), and i would only need to retrieve the name and address, will the use of the EntityClass objects drag down the speed as all attributes will be fetched?
yes this is by design/definatetion of what an Entity represents. you have some options on how to retrieve partial rows using LLBL.
1. TypedLists (similiar to typed datasets they are defined at design time)
2. DynamicLists (defined at runtime and populate datatables)
3. Projections (project a result set onto a custom object [usually a generic list of dtos or entitycollection])
4. use the LLBL designer to parse a single table into multiple entities. this can also create an entity heirachy which may be beneficial for your project.
5. use the ExcludedFields override when populating the collection (2.5 only)
yj wrote:
How does LLBLGen handle the SQL statements which needed Join and/or Union?
I haven't found a single sql statement that LLBL can't create. Granted this has required me to change how I design my queries or what object I use to design my queries. all in all I would say that LLBL has increased by query writing skills.
there are only 2 limitations I have found with LLBL 2.0 Sql Server.
1. case statements (now available in 2.5)
2. UDF's that return a table type.
both can be agrued that this belongs in the business logic, not the db. And most times I agree. plus with scalar queries, prefetch paths and a rich predicate system. I find I don't need these anymore.
I haven't worked with Oracle so the limitations (I hesaite to use that term) may be different, and/or mute.