BaseTen DP2 is out. The second developer preview incorporates a number of bug fixes, along with some functional changes to the way views (as opposed to physical tables) and relationships are handled.
When creating real world multi-user apps with a two-tier architecture (only the database server and the individual clients), views are often invaluable. That’s why we want to make their use as seamless as possible in BaseTen.
In DP2, the BaseTen Assistant supports setting the primary key columns of a view for the purposes of generating the database object id — this no longer needs to be done using -[BXEntityDescription setPrimaryKey:]. BaseTen DP2 can also automatically determine the physical tables a view is based on, so providing this information with -[BXEntityDescription viewIsBasedOnTablesInItsSchema:] or -[BXEntityDescription viewIsBasedOnEntities:] is no longer mandatory. Both of those calls can still be made in cases where, for example, the view depends on tables via an indirection such as a PL/pgSQL procedure.
If you want to have a relationship point from a view to another view instead of the physical table the foreign key constraint refers to, you still have to use -[BXEntityDescription setTargetView:forRelationshipNamed:]. We hope to have a nicer way of accomplishing this in a future release.
Leave a comment